On this page
Leave a bunch of bananas on the counter for a few days and a cloud of tiny flies shows up, often in a kitchen that had none the week before. It is chemistry (fermentation), smell and a very fast life cycle working together.
Why do tiny flies gather around ripe bananas?
The flies are usually vinegar or fruit flies of the genus Drosophila, about 1/8 inch (3 mm) long with red eyes, and they are attracted to ripened or fermenting fruits and vegetables, according to the University of Kentucky entomology fact sheet. The University of Wisconsin extension names overly ripe apples and bananas as typical places to find them hovering.
What they are really smelling is fermentation. Ethanol fermentation is a biological process that converts sugars such as glucose, fructose and sucrose into cellular energy, giving off ethanol and carbon dioxide (overview and equation). As a banana ripens and splits, yeasts get at its sugars.
The key experiment came from Paul Becher and colleagues at the Swedish University of Agricultural Sciences. In a 2012 study in Functional Ecology, baker's yeast on its own was enough for Drosophila melanogaster attraction, egg-laying and larval development, while attraction and egg-laying were significantly lower with unfermented grape juice. A synthetic blend of five yeast smells, including ethanol and acetic acid, was as attractive to the flies as fermenting grape juice. The flies are after the yeast, which is what their larvae feed on, according to the Wisconsin extension.
Where do fruit flies come from if the kitchen was empty?
Often they came in with the food or through a gap. The Kentucky fact sheet says infestations often start with tomatoes, melons, grapes and other perishable produce brought in from the garden, and adults can also fly in through badly screened windows and doors.
Females are choosy about where their eggs go. A 2009 PNAS study by Ryan Joseph and colleagues found that female flies are attracted to food containing acetic acid (the sour smell of vinegar) as an egg-laying site, using taste to pick it, even though their sense of smell makes them avoid staying on it.
People once thought small creatures grew out of rotting food. In 1668 Francesco Redi put meat and fish in jars, covered some with fine gauze and left others open; maggots appeared only in the open jars, where flies could land (summary of Redi's experiment).
How fast does a fruit fly grow from egg to adult?
A 2024 review in the journal Fly gives the timeline at 25 °C: the embryo develops in the egg for about a day, the larva feeds and moults three times over about five days, and the pupa takes about four days to turn into an adult. The Wisconsin extension puts the whole cycle at eight to 10 days.
A worked example with those numbers:
Day 0: a fly lays eggs on a split banana you have not noticed.
Day 1: tiny larvae hatch and start feeding in the soft, fermenting flesh.
Day 6: the larvae become pupae.
Day 10: adults emerge, and before long they lay the next batch.
So today's swarm was set up more than a week ago. That delay is why the flies seem to appear from nowhere.
How do you stop fruit flies in your kitchen?
Eat, throw away or refrigerate produce once it has ripened (Kentucky).
Check the bottoms of bins, recycling, fridge drain pans and drains with fermenting gunk (Wisconsin).
Catch adults with a jar baited with a little cider vinegar and a paper funnel in the top (Kentucky).
Can you repeat Redi's experiment with a banana?
Yes. With a life cycle of eight to 10 days (Wisconsin extension), two weeks is enough, and you need almost no equipment.
Put two slices of the same ripe banana in two clean jars.
Cover one jar with thin cloth held by a rubber band. Leave the other open.
Keep both in the same spot in the kitchen, so temperature is the same.
Each day, note the smell, any flies on or in each jar, and any tiny white larvae.
Before you start, write your prediction and the day you expect adults, using the timeline above.
At the end, seal both jars in a bag and throw them out.
To read up on fermentation or insect life cycles before writing up your results, the Fermi Concept Library has every concept in physics, chemistry, biology, mathematics and computing, each with its own lesson. For ideas that are easier to see than to read, try the Fermi Simulation Lab.



