Fruit flies don’t actually eat fruit, at least not the way you’d expect. Their primary food source is the yeast and microorganisms growing on the surface of overripe and decaying fruit. That thin, slightly slimy film you notice on a banana that’s past its prime is a buffet for these tiny insects. Understanding what draws them to food helps explain why they show up in your kitchen and, more importantly, how to get rid of them.
Yeast, Not Fruit, Is the Main Course
The common fruit fly (Drosophila melanogaster) feeds on yeasts growing on overripe fruit throughout its entire life cycle, from larva to adult. These yeasts are a major source of proteins and lipids, the two nutrients fruit flies need most for survival, reproduction, and larval growth. The sugars in decomposing fruit matter too, but mostly because they fuel the yeast colonies that fruit flies are really after.
This is why fruit flies seem to appear out of nowhere the moment your bananas start to brown or a tomato goes soft. The fruit itself isn’t the attraction. It’s the fermentation happening on the surface. As fruit breaks down, wild yeasts colonize it and produce the alcohols and organic acids that fruit flies can detect from surprising distances. A perfectly fresh apple sitting on your counter won’t draw them in. A bruised one will.
What Larvae Need vs. What Adults Eat
Fruit fly larvae and adults eat similar foods but have different nutritional priorities. Larvae are in a rapid growth phase, and they need high amounts of protein from yeast to develop on schedule. When researchers restricted yeast in larval diets, the flies developed more slowly and emerged as adults with lower protein levels and reduced energy stores. A low-yeast diet during development creates lasting metabolic effects that carry into adulthood.
Adult fruit flies balance their diet between yeast (for protein) and sugars (for energy). Diets high in sugar but low in yeast produce flies that weigh less but carry more fat. Adults actively regulate their food intake based on what nutrients are available. Male fruit flies, for example, increase their yeast consumption when sugar is scarce, suggesting they can sense and respond to nutritional imbalances in real time.
One Species Breaks the Rules
There’s an important exception to the “they only eat rotting fruit” rule. The spotted wing drosophila (Drosophila suzukii) is an invasive species that attacks fresh, undamaged fruit still on the plant. Unlike common fruit flies, it has a saw-like egg-laying organ that can pierce the skin of ripe berries, cherries, and grapes. Females lay eggs just beneath the surface of healthy fruit, and the larvae feed inside as it ripens. This species is a serious agricultural pest, particularly in berry-growing regions. If you’re finding tiny larvae inside fruit that looks perfectly fine from the outside, spotted wing drosophila is the likely culprit.
What Fruit Flies Eat in Your Home
In a kitchen, fruit flies aren’t limited to the fruit bowl. They’ll feed and breed on any moist organic material where yeast and bacteria are growing. Common sites include:
- Drain buildup: The slimy biofilm coating the inside of sink and shower drains is rich in bacteria, fungi, and decaying organic matter.
- Trash and recycling bins: Residue from juice containers, beer bottles, and food scraps creates ideal breeding conditions, especially in warm weather.
- Damp cleaning tools: Wet mop heads, sponges left in sinks, and dish rags that don’t dry fully can harbor enough microbial growth to sustain fruit flies.
- Forgotten spills: A sticky residue behind the toaster or under the fridge provides both sugar and moisture for yeast to grow on.
- Compost bins: Indoor compost containers are especially attractive because they combine decomposing fruit, moisture, and warmth in one place.
The common thread is fermentation. Anywhere sugars and moisture combine long enough for microbes to colonize, fruit flies will find it.
Why Vinegar Traps Work So Well
Knowing what fruit flies eat explains why apple cider vinegar is the go-to bait for homemade traps. Apple cider vinegar is, essentially, fermented fruit. It produces the same volatile compounds (acetic acid, ethanol) that signal “food source” to a fruit fly. The sweet, slightly sour smell mimics an overripe piece of fruit covered in active yeast colonies.
Adding a drop of dish soap to the vinegar breaks the surface tension of the liquid. Without it, fruit flies can land on the surface and fly away. With soap, their wings get wet and they sink. Red wine, old beer, and a mixture of warm water with active dry yeast all work for the same reason: they replicate the chemical signature of fermenting fruit.
Cutting Off the Food Supply
Because fruit flies eat microorganisms rather than fruit itself, eliminating them means removing the conditions that support microbial growth. Refrigerating ripe fruit takes away the warm, moist surface yeast needs. Rinsing produce when you bring it home removes yeast cells and any eggs that may already be on the skin. Cleaning drains with a stiff brush physically removes the biofilm that fruit flies breed in, something a simple blast of water won’t accomplish.
Empty bottles and cans are easy to overlook, but a recycling bin full of unwashed containers is one of the most productive breeding sites in a typical kitchen. Even a thin layer of juice or beer residue in a warm bin gives fruit flies everything they need: sugar, moisture, and yeast. Rinsing containers before tossing them, taking recycling out frequently, and keeping bins dry eliminates a food source most people never think about.