02Home & Garden · Updated
How to Get Rid of Fruit Flies and Keep Them Away
Short answer
Remove breeding spots and trap adult flies
Discard overripe produce, clean food and liquid spills, and remove damp organic waste. Then use a simple vinegar trap for remaining adults while you check drains, recycling, and other places where flies may be breeding.
Why fruit flies appear indoors
Fruit flies are small flies attracted to fermenting or ripening organic material. They commonly arrive on produce or enter through an open door or window, then linger where food residue, moisture, and suitable places to lay eggs are available. A bowl of ripe fruit is an obvious attraction, but a forgotten onion, sticky recycling container, damp compost pail, or beverage spill can also sustain them.
Adult flies are easy to notice, but the source may be less obvious. They lay eggs on moist, fermenting material, and larvae develop there before becoming adults. That is why killing the visible flies alone often gives only brief relief: if eggs or larvae remain in a food source, more adults can appear. Effective control means removing the material that supports breeding, not simply spraying the room.
Fruit flies are often confused with fungus gnats and drain flies. Fungus gnats are usually associated with damp potting soil and may hover around houseplants. Drain flies look fuzzy or moth-like and tend to rest near drains. Fruit flies are generally tan to brown, with compact bodies and often noticeable red eyes, although appearance can vary. Identifying where and how the insects gather helps point to the right source.
How to get rid of fruit flies step by step
- Remove ripe and damaged produce. Inspect fruit, vegetables, potatoes, and onions. Discard anything rotting or badly damaged, and refrigerate ripe fruit if you do not plan to eat it soon. Wash reusable fruit bowls and the shelf or counter beneath them.
- Clean sticky residues. Wipe counters, cabinet edges, appliance surfaces, and the area around the sink. Clean juice, wine, soda, and food spills, including spots under small appliances. Rinse cloths and sponges and let them dry rather than leaving them wet and sour-smelling.
- Empty and wash waste containers. Take out kitchen trash, compost, and food scraps. Clean the inside and rim of the bin, and rinse bottles and cans before placing them in recycling. A little residue in a container can be enough to attract flies.
- Check likely hidden sources. Look beneath appliances, around stored produce, in recycling, and near pet-food dishes. Remove old food and clean any damp or sticky material. If flies gather by a sink, inspect the drain and nearby overflow opening rather than assuming the fruit bowl is responsible.
- Set a trap for adults. Put a small amount of apple cider vinegar in a cup or jar and add a drop of dish soap. The vinegar attracts many fruit flies; the soap reduces the liquid’s surface tension, making it harder for flies to escape after landing. Place the trap near the activity, but away from food-preparation surfaces.
- Keep checking and cleaning. Replace the trap liquid when it becomes dirty or ineffective. Continue removing potential breeding material and watch where new flies appear. If activity persists, search again for a source rather than adding more traps alone.
Traps can catch adults, but they are a supporting measure, not a substitute for sanitation. A well-placed trap may also help you see whether activity is declining. Keep it out of reach of children and pets, and do not put it where it could spill into food or onto a work surface.
Where fruit flies may be breeding
When the source is not visible, inspect places where small amounts of wet, decomposing material can collect. Fruit flies do not need an exposed bowl of fruit if another suitable source is available. Check these areas carefully:
- Kitchen trash and compost containers, including the lid, rim, and floor beneath them.
- Recyclable bottles, cans, and jars with leftover juice, wine, or other sweet liquid.
- Produce stored in a pantry, cupboard, or bag, especially potatoes and onions that can be overlooked.
- Drains, drain strainers, and sink overflow openings where organic residue may build up.
- Spilled food or drink beneath a refrigerator, stove, microwave, or other appliance.
- Damp cleaning materials, mop buckets, or reusable cloths left with food residue.
Drains deserve a closer look when flies repeatedly gather around the sink. A drain can hold a film of organic matter, but not every fly near a drain is a fruit fly. Observe the insect’s appearance and where it rests. If they are fuzzy and moth-like, drain flies may be a better match; if they hover near plant pots, fungus gnats may be involved. The control method should fit the insect and its breeding site.
Choosing and using a fruit fly trap
A homemade vinegar trap is useful because it is simple and can be made with common household items. Apple cider vinegar is a familiar bait, though other fermenting or sweet-smelling liquids may attract flies as well. A drop of dish soap helps trap flies that reach the liquid. Avoid filling a container so high that it can spill easily, and place it where it will not be knocked over.
Some people cover a jar with plastic wrap and make small holes in the covering. This can let flies enter while making the exit less obvious, but it is not essential; a soap-and-vinegar cup can also catch adults. Commercial sticky traps can capture flying insects, but they do not remove the breeding source either. Choose a trap that is easy to position safely and clean or discard.
Do not expect a trap to eliminate every fly immediately. Traps catch adults that encounter them; they do not reliably remove eggs and larvae hidden in food residue. If a trap catches flies but more keep appearing, that is a clue to continue searching for a breeding site. Adding several traps while leaving spoiled produce or a dirty bin in place is unlikely to solve the underlying problem.
Cleaning drains and kitchen surfaces
For a suspected drain source, remove visible debris from the strainer and clean accessible surfaces around the drain. Follow the sink or drain product’s label if you use a cleaner, and never mix cleaning products. Do not pour pesticides into a drain unless the product label specifically permits that use. A drain-cleaning step should address organic buildup, not just mask odors.
Clean counters and food-contact surfaces with a method appropriate for the material, and follow the directions on any cleaner or sanitizer. Keep cleaning chemicals away from food, and do not combine products such as bleach and ammonia. Wiping the sink rim and drying standing water can help remove residue and make the area less inviting, though moisture by itself is not the same as a food source.
Common mistakes and misconceptions
- Only swatting adults: This removes individual flies but leaves eggs, larvae, and the food source untouched.
- Assuming all small flies are fruit flies: Fungus gnats and drain flies have different likely sources, so look at where they gather and how they appear.
- Leaving the trap out indefinitely: A trap can become dirty or lose its usefulness. Refresh it and continue source checks.
- Ignoring recycling: A bottle that looks empty may still contain enough sweet residue to attract flies.
- Using insect spray as the main solution: Spraying does not remove breeding material and may contaminate food, dishes, or preparation surfaces. Prioritize cleaning and follow product labels if any pesticide is used.
- Thinking fruit is the only possible source: Fermenting scraps, spills, trash residue, and other damp organic matter may also support flies.
Another common misconception is that a clean kitchen cannot have fruit flies. A few can arrive with produce, and a small overlooked spill or container residue may be sufficient to keep them around. Focus on locating and removing the source rather than treating their presence as proof that the whole room is dirty.
How to prevent fruit flies from returning
Prevention is mostly a matter of managing ripe food and cleaning small residues before they ferment. Refrigerate ripe produce when appropriate, check stored vegetables regularly, and discard spoiled items promptly. Keep counters free of crumbs and sticky liquid, and rinse recycling containers before storing them. Empty food waste often enough that scraps do not sit and break down indoors.
Use a clean, covered container for compost or food scraps if you keep them inside, and wash the container regularly. Keep sink strainers clear, clean spills promptly, and avoid leaving juice or other sweet drinks in open containers. Screens on doors and windows can reduce the chance of insects entering, although they will not solve a breeding source already present inside.
For example, if flies appear after bringing home bananas, inspect the fruit and bowl, wipe the counter, and check the nearby trash and recycling. If they return after the bowl is cleaned, look farther afield: a forgotten potato in a cupboard or a sticky bottle may be the real source. A short, systematic inspection is often more useful than repeatedly changing trap recipes.
Frequently Asked Questions
How long does it take to get rid of fruit flies?
It depends on whether you find and remove every breeding source. Adult flies may continue to appear while immature flies develop in material that was missed, so keep inspecting and cleaning until activity stops.
Does vinegar kill fruit flies?
Vinegar attracts many fruit flies, but vinegar alone is not a reliable way to eliminate an infestation. Adding a drop of dish soap can help trap flies that land in it; removing the source is still the essential step.
Why are fruit flies in my bathroom?
They may be coming from a nearby drain or from organic residue elsewhere in the home, rather than breeding in the bathroom itself. Check the sink and shower drains, trash, damp cleaning items, and any food or drink containers nearby.
Can fruit flies come from houseplants?
Small flies around houseplants may be fungus gnats, which are associated with damp potting soil, rather than fruit flies. Check whether the insects concentrate around the soil or around ripe produce and fermenting scraps.
Will fruit flies go away on their own?
They may decline if the food source disappears, but flies can persist if eggs or larvae remain in suitable material. Remove possible breeding spots and use a trap to catch adults while you monitor the area.
When to seek more help
If careful cleaning and source removal do not reduce the problem, consider whether the insects have been identified correctly or whether a source is inaccessible, such as residue inside a drain or behind an appliance. A licensed pest-control professional can help identify persistent insect activity and recommend an approach suited to the home. If using any pesticide, read and follow its label, keep it away from food and food-contact surfaces, and observe all safety directions.
Further reading: University of California Agriculture and Natural Resources. Details can change, so check the official page for anything that matters to you. Spotted a mistake? Tell us. How we write an answer.