Why do flies rub their legs together?
The short answer
Flies rub their legs together to clean off dust, dirt, moisture, and pollen that can interfere with their senses. Staying clean helps them fly, avoid infections, an taste with their feet.
The long answer
You've probably spotted a fly rubbing its little legs together and wondered what that's all about.
The options run through your head (memes linked for illustrative effect):
(D) All of the above?
Although it's impossible to rule out world domination, grooming is the reason why flies rub their legs together.
In fact in โ2014โ, researchers purposefully covered flies in dust (rude) and then observed their cleaning routine. They found that a fly might spend more than 20 minutes methodically removing dust from its head, wings, back, and legs.
But for an animal that spends a lot of its lifespan hanging around poop, why are they so concerned with staying clean? Let's dig into the reasons why flies groom themselves:
Reason #1: Flies are maintaining good flying performance
Flies fly. To fly well, they are loaded up with touch- and movement-sensitive receptors on their legs and other parts of their body (which also help them avoiding your swatting).
"โHousefly musca domestica cropped (2)โ" (modified) by โMuhammad Mahdi Karimโ is licensed under โGNU Free Documentation Licenseโ, Version 1.2.
These receptors must be kept free of dirt, dust, pollen, and moisture in order for them to work effectively for flight. Flies use their hairy legs to clean their head, wings, and other legs. Cleaning is part of their pre-flight checklist.
Reason #2: Flies are trying to prevent illness
The bristles on their legs can also attract deadly molds and fungi. Constantly keeping their legs clean helps to maintain good health.
Reason #3: Flies are cleansing their palate
We humans like to think we're special because of our fancy opposable thumbs. But flies have something we don't: The ability to taste with their feet.
"โFruit Fliesโ" is part of the public domain.
Flies walk around tasting for their favorite foods. (Fun fact: Fruit flies don't eat fruit. Instead they eat the yeast that forms on rotting fruit, which is why they tend to show up when you've let your fruit go too ripe.) Once their taste receptors have detected something tasty, they regurgitate saliva from their stomach to break it down into liquid. Without teeth, flies drink their food by sucking it up with a straw-like part of their mouth.
If their taste receptors get clogged with dust or dirt, they won't be as able to find their next meal. Cleaning their legs is essentially a fly's way of cleansing its palate.
Female flies also rely on their taste receptors to identify the best place to lay their eggs. โ
Curious about how the world works?
Today You Should Know is a free, weekly email newsletter designed to help you learn something new every Friday.
Subscribe today ๐
Check out some other curious questions:
Sources
Bensinger, E. (2025, June 21). What Are Flies Doing When They Rub Their Hands?. wikiHow. https://www.wikihow.com/Why-Do-Flies-Rub-Their-Hands-Together
Danenhauer, M. (2017, March 21). Why Do Flies Rub Their Legs Together?. Jakeโs Nature Blog. https://jakesnatureblog.com/2017/04/05/why-flys-rub-legs-together/
Jones, R. (2023, February 28). Why do flies rub their legs together?. Discover Wildlife. https://www.discoverwildlife.com/animal-facts/insects-invertebrates/why-do-flies-rub-their-legs-together
Menjivar, A. (2023, April 15). Why Do Flies Rub Their Hands Together?. A-Z Animals. https://a-z-animals.com/blog/why-do-flies-rub-their-hands-together/
Ray, C. C. (2002, December 17). Q&A; Gleeful Flies?. The New York Times. https://www.nytimes.com/2002/12/17/science/q-a-gleeful-flies.html
Rentokil North America, Inc. (n.d.). What Do Flies Eat?. Terminix. https://www.terminix.com/other/flies/what-do-flies-eat/
Seeds, A. M., Ravbar, P., Chung, P., Hampel, S., Midgley, F. M., Mensh, B. D., & Simpson, J. H. (2014). A suppression hierarchy among competing motor programs drives sequential grooming in drosophila. eLife, 3. https://doi.org/10.7554/elife.02951
Itโs like an American accent but with calendars.