Why Do Flies Rub Their Hands Together?

Flies rub their hands together to clean them: the “hands” are front feet, and those feet carry taste sensors and sticky pads that stop working when they are coated in dust, pollen or food. A fly sweeps its head with its front legs, then rubs the legs against each other to scrape off what it collected. The back legs do the same job for the wings and abdomen. It is housekeeping, not scheming, and it is also why a fly that has walked on garbage can leave germs on your food.
The gesture looks like a villain planning something. The biology is more useful: grooming follows a fixed order, the feet really do taste, and the same habits explain why flies matter around food.
What each grooming move is doing
The clearest study of fly grooming comes from the Howard Hughes Medical Institute’s Janelia Farm Research Campus, where Seeds and colleagues coated fruit flies in dust and filmed them cleaning up. Dusted flies followed a predictable order: eyes first, then antennae, then the abdomen, wings and thorax. Front legs clean the head; hind legs clean the abdomen, wings and thorax. Between sweeps, the flies rubbed their legs together to shed the dust they had just gathered.
| What you see | Legs used | What it does | Priority in the sequence |
|---|---|---|---|
| Front legs wiping over the eyes | Front pair | Clears the compound eyes | First |
| Front legs pulling down over the antennae and head | Front pair | Clears the smell organs on the antennae | Second |
| “Hand rubbing”: front legs rubbed against each other | Front pair, sometimes with the middle pair | Scrapes collected dust towards the leg tips and off | Repeated between every few sweeps |
| Back legs stroking under the abdomen | Hind pair | Cleans the abdomen | Third |
| Back legs drawn over and under the wings | Hind pair | Cleans the wings | Fourth |
| Back legs rubbed against each other | Hind pair | Sheds the dust from the rear sweeps | Repeated between sweeps |
The researchers found the order is enforced by a suppression hierarchy in the fly’s nervous system: the urge to clean the head overrides the urge to clean the abdomen, which overrides the wings, which overrides the thorax. As each body part gets clean, the signal driving that movement fades and the next one takes over. Dust was the trigger: undusted flies did not run through the sequence in order.
Why do flies rub their hands together and rub their head?
Because the head carries the sensors the fly most needs. The eyes and antennae are cleaned first, and the authors suggest this likely protects the sense organs. The front legs do the wiping, then get rubbed together to dump what they picked up, then go back to the head. The alternation between sweeping and rubbing is the whole routine in miniature.
Why do flies rub their wings with their back legs?
The hind legs are the cleaning tools for the rear half of the body. In the dust experiments, flies worked through the abdomen, then the wings, then the thorax with the hind legs, rubbing the two hind legs together between sweeps. The authors suggest the abdomen comes early possibly so that dust does not interfere with breathing. The wings follow, which is the stroke you see when a fly reaches back and draws its legs along them.

Do flies taste with their feet?
Yes. The legs of flies are taste organs. In the fruit fly, the best-mapped species, Ling and colleagues at Yale counted about 28 taste sensilla (taste hairs) on the foot segments of the front leg, 21 on the middle leg and 22 on the hind leg, with another 10 to 12 on the lower leg. The mouthparts carry about 31. Taken together, the feet hold more taste sensors than the mouth, as the authors note.
Those foot sensors make first contact with anything a fly walks on. They respond to sugars, an indication of food, and to bitter compounds, an indication of something toxic. The most broadly tuned ones sit closest to the tip of the leg, which is the part most likely to touch food. Male fruit flies have more taste hairs on their front legs than females do.
House flies work the same way. In a 2024 study of house fly feeding behaviour, researchers screened each fly by touching only its feet to a 30 per cent sugar solution; flies that tasted the sugar through their feet responded by extending the proboscis, the sponge-tipped mouthpart, to feed. The same paper notes that in flies, taste sensors sit on the mouthparts, legs, antennae, egg-laying tube and even the wings. That is why a house fly walks on your sandwich before it eats: the walking is the tasting.
That is the main reason the hand rubbing matters to the fly: the feet are its first taste test of every surface.
Sticky feet need to stay clean too
Taste is half of it. The other half is grip. Flies have adhesive pads called pulvilli on the last segment of each foot. Gorb’s 1998 electron microscope study showed the pads are covered in tiny hairs, and the tips of those hairs deliver an adhesive fluid right where they touch the surface. A later study measured the attractive forces those fluid-coated tips generate, which hold the fly on smooth surfaces such as glass.
Dust and pollen get in the way of that contact. Work on other insects with sticky pads, stick insects and leaf beetles, makes the point that efficient adhesion has to survive contamination, that many insects groom their pads, and that the pads also shed particles as the insect walks. A fly that grooms keeps its grip and its sense of taste working with the same movement.

Why the cleanest fly is still a food safety problem
Here is the catch. Grooming cleans the fly for the fly’s purposes. It does not sterilise anything, and it moves material around the body rather than destroying it.
University of Florida entomologists list the routes by which house flies move pathogens to human and animal food: on their mouthparts, through their vomit and droppings, and on contaminated external body parts. House flies cannot bite; their sponging mouthparts are built for liquids, and some pathogens they swallow can survive in the gut for several days before being passed on when the fly defecates or regurgitates. Among the bacteria commonly carried are Salmonella, Shigella, Campylobacter and Escherichia, and flies are most often linked to outbreaks of diarrhoea and shigellosis.
A 2018 systematic review in BMC Public Health pulled together 99 studies and found at least 130 pathogens isolated from house flies, mostly bacteria. Where the pathogens were found is the useful part for this question: the outside of the fly was the most common site.
A fly rubbing its hands is cleaning its sensors, not making itself safe to share your lunch with. For food safety questions, the CDC and your local health department are the right sources; for prevention, keep flies away from food.
Why do flies like poop?
Because it is where house flies feed and breed. Female house flies need protein before they can produce eggs, and University of Florida notes that manure alone is not enough. A Texas study cited by the same source ranked breeding sites, in descending order of suitability, as horse manure, human excrement, cow manure, fermenting vegetables and kitchen waste. Blow flies favour dead animals and protein-rich garbage, as Purdue explains. Our guide to maggots in a trash can covers how fast that turns into a new generation.
Why do flies land on you?
A fly that lands on your arm is usually doing what it does on any surface: tasting it with its feet. House flies do not bite, as University of Florida notes, and they have no need of your blood. A few lookalikes are a different story, and if a “house fly” actually bites, it is probably not a house fly.
| Fly that lands on people | Size | What it wants | Bites? |
|---|---|---|---|
| House fly | 6 to 7 mm, about a quarter inch | Liquid food it can taste and sponge up | No; sponging mouthparts |
| Stable fly | 5 to 7 mm | Blood, mainly from cattle and horses, but it will bite people and dogs | Yes; bayonet-like mouthparts |
| Eye gnat (females) | 1/16 to 1/8 inch | Sweat, tears and other secretions at eyes, nose and mouth, for protein | No, but persistent |
| Cluster fly | 3/8 to 1/2 inch | Shelter; sluggish flies at windows in autumn and spring | No |
| Horse and deer flies | Larger, see our guide | Blood | Yes |
The stable fly is the one people most often mistake for a house fly. University of Florida describes it as similar in size and colouring, with seven spots in a checkerboard pattern on the abdomen and elongated, bayonet-like mouthparts for piercing skin. Eye gnats, which UC IPM says are so persistent that brushing them away does not work, explain the tiny flies that keep returning to your eyes and mouth. For the biting species, see our guide to horse flies and deer flies.

When you will see the most flies grooming
The Pest Control Brief analysis of iNaturalist research-grade records shows the house fly taking its largest share of what people record in October and November, at roughly twice its usual share, while in January to May it runs at about half. Blow flies peak a little earlier, in September and October. Fruit flies, the species behind the taste research above, peak in November.
These are records of where and when people photographed flies, not counts of flies in homes. Our own analysis of New York restaurant inspections shows a similar long tail: flies were cited at 24.7 per cent of the 27,050 food businesses inspected since the start of 2024, and fly citations ran from 15.7 per 1,000 citations in March to 60.1 in August, staying high into November. The full breakdown is in our restaurant fly violations analysis.
Late season flies indoors are often cluster flies or house flies seeking shelter, which we cover in where flies go in winter. A sudden crowd is a different problem with three usual causes, explained in lots of flies in the house all of a sudden.
What this means for keeping flies off your food
- Cover food outdoors. A fly tastes with its feet before it feeds, so any landing is contact. Covers and quick clearing keep that contact down.
- Remove the breeding material. Purdue calls sanitation the first line of defence, since flies can go from egg to adult in as few as 7 to 10 days. Pick up pet waste and keep bins lidded and rinsed.
- Screen and close. Tight screens and closed doors keep flies out; Purdue notes broken screens are an open invitation.
- Use traps where flies rest, not where you eat. Our guide to getting rid of flies outside covers placement and which methods measurably help on patios.
- Call a professional when flies keep coming back despite clean bins, or you suspect a dead animal in a wall.
How long any of those flies will be around is covered in how long flies live; University of Florida puts typical adult house fly life at 15 to 25 days.
Why do flies exist?
People also ask, sometimes as a religious or philosophical question, why flies exist at all. The biology has a practical answer. Flies are among the insects that pollinate crops: a 2016 analysis of 39 field studies on five continents found that non-bee insects, flies among them, made 25 to 50 per cent of all flower visits to crops, and that fruit set rose with their visits independently of bees. Their maggots develop in dung, dead animals and rotting matter, which is part of how that material is broken down.
Frequently asked questions
What does it mean when flies rub their hands?
It means the fly is cleaning. Its “hands” are front feet carrying taste sensors and sticky pads, and dust, pollen or food residue stops both working well. Studies of dusted flies show they wipe the eyes and antennae with the front legs, rub the legs together to shed what they collected, then use the back legs on the abdomen and wings. It is routine grooming, not a sign of anything else.
Why do flies like to annoy us?
They do not set out to. A house fly that keeps landing on you is sampling surfaces with its feet, looking for liquid food it can sponge up, and it returns because it is persistent rather than hostile. Some lookalikes are more interested in people: female eye gnats seek secretions at the eyes and mouth for protein, and stable flies bite. Covering food and screening windows reduces landings.
Could we survive without flies?
People would, but ecosystems and farms would be poorer for it. Flies are among the non-bee insects that a 2016 analysis of 39 field studies found make 25 to 50 per cent of flower visits to crops, raising fruit set independently of bees. Fly maggots also develop in dead animals, dung and rotting matter, and are part of how that material is broken down and recycled.
Do flies feel it when you hit them?
Flies detect harmful stimuli and react to them, which is called nociception, and researchers say this ability evolved more than 500 million years ago. A 2019 Drosophila study found that nerve injury left flies with lasting heightened sensitivity, and a 2022 review argued insects probably have brain control over these responses. Whether that amounts to pain as people experience it is still debated.
Why do flies rub their wings with their back legs?
The hind legs are the cleaning tools for the back half of the body. In grooming studies, flies clean the abdomen, then the wings, then the thorax with the hind legs, rubbing the two hind legs together between sweeps to shed dust. Clean wings and clean sensory hairs help the fly fly, land and sense air movement properly.
Sources
- Seeds, Ravbar, Chung, Hampel, Midgley, Mensh and Simpson, A suppression hierarchy among competing motor programs drives sequential grooming in Drosophila, eLife, 2014.
- Ling, Dahanukar, Weiss, Kwon and Carlson, The molecular and cellular basis of taste coding in the legs of Drosophila, Journal of Neuroscience, 2014.
- Use of the Proboscis Extension Response Assay to Evaluate the Mechanism of House Fly Behavioral Resistance to Imidacloprid, Insects, 2024.
- Gorb, The design of the fly adhesive pad: distal tenent setae are adapted to the delivery of an adhesive secretion, Proceedings of the Royal Society B, 1998.
- Langer, Ruppersberg and Gorb, Adhesion forces measured at the level of a terminal plate of the fly’s seta, Proceedings of the Royal Society B, 2004.
- Clemente, Bullock, Beale and Federle, Evidence for self-cleaning in fluid-based smooth and hairy adhesive systems of insects, Journal of Experimental Biology, 2010.
- University of Florida IFAS Extension, EDIS EENY-048 (IN205), House fly, Musca domestica, 2014.
- University of Florida IFAS Extension, EDIS, Stable fly, Stomoxys calcitrans.
- Khamesipour and colleagues, A systematic review of human pathogens carried by the housefly, BMC Public Health, 2018.
- University of California Statewide IPM Program, Eye Gnats.
- Purdue University Extension E-7, Flies in and around the home.
- Colorado State University Extension, Cluster flies and other winter flies.
- University of Wisconsin Insect Diagnostic Lab, Blow flies indoors, 2022.
- University of Kentucky Entomology ENTFACT-621, Fruit flies.
- Khuong and colleagues, Nerve injury drives a heightened state of vigilance and neuropathic sensitization in Drosophila, Science Advances, 2019.
- Gibbons, Sarlak and Chittka, Descending control of nociception in insects?, Proceedings of the Royal Society B, 2022.
- Rader and colleagues, Non-bee insects are important contributors to global crop pollination, PNAS, 2016.
- The Pest Control Brief analysis of iNaturalist research-grade records, pulled October 2026.
- The Pest Control Brief analysis of NYC DOHMH restaurant inspection results, 2024 to 2025.


