Fruit flies mainly feed on sugary liquids produced by ripe, damaged, or fermenting organic material. Despite their name, they do not depend exclusively on fruit. They can also survive around vegetables, alcoholic beverages, vinegar, food spills, garbage, compost, and residue inside drains. Adult fruit flies drink liquids from these materials, while their larvae consume yeast, bacteria, and decomposing matter at the breeding site. Understanding what fruit flies eat makes it easier to locate an infestation and remove the food sources allowing them to reproduce.
What Do Fruit Flies Eat?
Fruit flies prefer moist, sugary, and fermenting materials. Their sponge-like mouthparts allow adults to consume liquids but not bite or chew solid food.
When fruit starts decomposing, microorganisms break down its sugars and produce strong fermentation odors. These smells guide fruit flies toward suitable feeding and breeding locations.
Adult vs. Larval Fruit Fly Diet
| Life stage | Main diet |
| Adult fruit fly | Sugary and fermented liquids |
| Fruit fly larva | Yeast, bacteria, and decaying organic matter |
| Pupa | Does not actively feed |
10 Common Foods Fruit Flies Eat

Fruit flies are attracted primarily to moist foods containing sugar, yeast, and fermenting organic matter. They can feed on many items found in kitchens, garbage bins, and compost containers. The following foods commonly attract and support fruit flies.
1. Overripe Fruit
Overripe fruit is one of the most important food sources for fruit flies. Bananas, peaches, grapes, mangoes, apples, melons, berries, and pears become especially attractive when their skins are bruised or broken.
As the fruit ripens, yeast and bacteria begin breaking down its sugars. Adult flies drink the resulting juices, while females may lay eggs on the moist surface. The larvae later feed on the microorganisms and decomposing material.
Fresh, undamaged fruit is usually less attractive than fruit that has started softening or fermenting.
2. Rotting Vegetables
Fruit flies also eat liquids and microorganisms associated with decaying vegetables. Tomatoes, potatoes, onions, pumpkins, peppers, and other produce can support an infestation when they become damaged or rotten.
A forgotten onion or potato inside a cupboard may attract fruit flies even when no fruit is visible on the counter. Check stored vegetables for soft spots, mold, leaking liquid, and unpleasant odors.
Discarding rotten vegetables and cleaning the storage area can remove an important breeding source.
3. Fruit Juice
Fruit juice contains water and natural sugar, making it highly attractive to fruit flies. Adults may gather around open juice containers, dirty glasses, discarded juice boxes, or small spills on counters.
Even a thin layer of juice left inside a bottle may provide enough food for several flies. Juice that remains at room temperature can begin fermenting, making it even more attractive.
Rinse empty containers before recycling them and clean juice spills immediately.
4. Wine and Beer
Wine and beer are fermented beverages that produce odors fruit flies can detect easily. Adults may enter open bottles, gather around glasses, or feed on small amounts spilled near a bar or kitchen counter.
Fruit flies can survive on residue left inside bottles and cans. This is why recycling bins containing unwashed beverage containers frequently become infestation sources.
A small amount of wine or beer can also be used as trap bait. Adding a drop of dish soap makes it more difficult for flies to remain on the liquid’s surface.
5. Vinegar and Fermented Liquids
Fruit flies are attracted to vinegar because its odor signals fermentation. Apple cider vinegar is especially appealing because it has a fruity smell similar to decomposing produce.
Adults may feed on small quantities of vinegar and other fermented liquids. However, vinegar is commonly used to lure them into homemade traps rather than serving as a major natural food source inside homes.
White vinegar may attract some fruit flies, but apple cider vinegar and red wine vinegar are usually more appealing.
6. Sugar, Syrup, and Sweet Spills
Fruit flies can consume sugary liquids from soda, energy drinks, sweet tea, syrup, jam, jelly, and dessert residue. They are particularly attracted when these substances are mixed with water or begin fermenting.
Dry sugar alone is not as attractive because adult fruit flies need liquid food. However, damp sugar around a container, drink dispenser, or garbage bin may support feeding.
Clean sticky spills from counters, floors, cabinets, and underneath appliances to reduce available food.
7. Yeast
Yeast is an essential part of the fruit fly diet. Adult fruit flies are attracted to the odors released when yeast breaks down sugar, and larvae feed heavily on yeast growing within decaying fruit.
This relationship explains why bread dough, brewing materials, fermented drinks, and decomposing produce may attract fruit flies.
A mixture of sugar, warm water, and yeast can be used as homemade trap bait. As the yeast ferments the sugar, it produces odors that lure adult flies toward the container.
8. Garbage and Compost
Garbage and compost bins can contain many fruit fly food sources, including fruit scraps, vegetable peels, beverage residue, and other moist organic waste.
Adults feed on the liquids produced as these materials decompose. Females may also lay eggs near the surface, allowing larvae to develop inside the waste.
Keeping a lid on the container may not be enough if residue remains around the rim or bottom. Empty bins frequently, wash them thoroughly, and allow them to dry before adding a new liner.
9. Organic Residue Inside Drains
Fruit flies may feed and reproduce in organic buildup inside kitchen drains, garbage disposals, and floor drains. This material may contain food particles, sugar, yeast, and bacteria.
The insects do not eat the metal or plastic drain itself. They use the moist film attached to the inside of the pipe.
Pouring water down the drain may not remove this buildup. Scrubbing the pipe opening with a drain brush and using an enzyme-based cleaner can help eliminate the food source.
Drain flies and phorid flies may also live around plumbing, so insects near a sink are not always fruit flies.
10. Fungi, Bacteria, and Decaying Plant Material
Fruit flies consume microorganisms growing on decomposing organic matter. Larvae depend particularly heavily on yeast, bacteria, and other microbes within their breeding environment.
They may develop in fallen flowers, rotting plant material, damp coffee grounds, dirty cleaning tools, and food residue beneath appliances.
Fruit flies found around houseplants may be confused with fungus gnats. Fungus gnats are dark, slender insects that breed in damp soil, whereas fruit flies have rounder tan or brown bodies and usually remain near fermenting food.
What Do Baby Fruit Flies Eat?
Baby fruit flies are wormlike larvae rather than tiny flying adults. They hatch from eggs laid on moist, fermenting material.
The larvae feed on yeast, bacteria, fungi, and decomposing organic matter. They remain close to the surface because they need access to oxygen. After feeding and growing, they move to a drier area, become pupae, and eventually emerge as adults.
Removing adult flies without eliminating the larval food source will not end an infestation.
Do Fruit Flies Eat Fresh Fruit?

Fruit flies may land on fresh fruit, but they strongly prefer ripe, damaged, or fermenting produce. An intact fruit skin can make it difficult for them to reach the juices underneath.
Bruises, cuts, cracks, and soft areas give adults access to liquid and provide places for females to lay eggs. Washing produce and storing ripe fruit in the refrigerator can reduce fruit fly activity.
Do Fruit Flies Eat Plants?
Fruit flies do not normally feed on healthy houseplants or plant roots. Small flies gathering around potting soil are more likely to be fungus gnats.
Fruit flies may visit a plant when it has fallen flowers, rotting leaves, damaged fruit, or decomposing organic material nearby. Removing dead plant matter can prevent it from becoming a food source.
Do Fruit Flies Eat Humans or Blood?
Fruit flies do not feed on human blood and cannot bite people. Their mouthparts are designed for sponging up liquids rather than piercing skin.
They may fly around a person because of a sweet drink, food residue, perfume, shampoo, or other attractive odor. This behavior does not mean they are trying to feed on the person.
How Long Can Fruit Flies Live Without Food?
Fruit flies cannot survive indefinitely without food or moisture. Their survival time depends on temperature, humidity, age, and access to water.
Removing one fruit bowl may not starve them because tiny quantities of food can remain inside drains, garbage bins, recycling containers, beverage bottles, or beneath appliances. Thorough cleaning is therefore more effective than simply hiding visible produce.
How to Remove Fruit Fly Food Sources

The most effective way to control fruit flies is to eliminate both their food and breeding materials.
- Refrigerate ripe fruit and vegetables.
- Discard rotten produce immediately.
- Clean juice, soda, and alcohol spills.
- Rinse cans and bottles before recycling.
- Empty garbage and compost regularly.
- Scrub food buildup from drains.
- Wash fruit bowls and storage containers.
- Clean beneath refrigerators and appliances.
- Keep wet mops and clothes clean and dry.
- Store onions and potatoes in clean, inspected areas.
Vinegar traps can capture adult flies, but sanitation is necessary to eliminate eggs and larvae.
FAQs
What is a fruit fly’s favorite food?
Fruit flies are most attracted to overripe and fermenting fruit. Bananas, grapes, peaches, melons, and other sugary fruits become especially appealing when damaged or beginning to decompose.
Do fruit flies eat mold?
Fruit flies may feed around moldy material, but they are mainly consuming liquids, yeast, bacteria, and other microorganisms associated with decomposition. Mold can indicate that suitable food and moisture are present.
Do fruit flies eat coffee grounds?
Fruit flies may visit wet coffee grounds when they contain sugar, milk, or decomposing organic residue. Plain, dry grounds are less attractive, while damp grounds left inside a trash or compost bin may support activity.
Can fruit flies survive without fruit?
Yes. Fruit flies can survive on fermenting vegetables, juice, wine, beer, vinegar, sugary spills, garbage residue, and other moist organic materials. Removing fruit alone may not eliminate them.
What attracts fruit flies but kills them?
Apple cider vinegar mixed with one or two drops of dish soap can attract and trap adult fruit flies. The vinegar provides a fermented odor, while the soap causes flies landing on the liquid to sink.