How to Get Rid of Fruit Flies
Find and clear what the flies are breeding in (overripe produce, drains, bins, sour rags), then trap the adults with cider vinegar. The advice follows university extension fact sheets.

Find and remove what the flies are breeding in, then trap the adults that are left. Traps alone only catch the flies you can see; the next generation is already growing in the source.
At a glance
- Difficulty
- Beginner
- Active time
- About 30 minutes, then a few days of checking traps
- Cost
- Usually nothing beyond what is in the kitchen: cider vinegar, a jar, paper or plastic wrap
- Call a pro?
- Rarely. If flies keep coming from a drain you cannot clean, call a plumber.
Why the source matters more than the trap
Fruit flies breed in moist, fermenting food. The University of Kentucky's extension entomologist puts the whole life cycle, egg to adult, at about a week, and notes that a female can lay about 500 eggs (University of Kentucky Entomology, Fruit Flies). Adults keep appearing for as long as there is somewhere wet and sweet for larvae to grow, and the same fact sheet is blunt: until the breeding sites are gone, the problem will continue no matter how often insecticides are applied to the adults.
Step by step
Find the breeding site
Start with the obvious: fruit and vegetables that have gone past ripe, including the potato or onion that rolled to the back of a low cupboard. Then work through the places the University of Kentucky sheet lists: drains, garbage disposals, empty bottles and cans, trash containers, mops and cleaning rags, and a recycling bin that is never emptied or rinsed. Iowa State's extension adds slow or seldom-used sink, tub, shower and floor drains, and wet spots under dripping pipes and refrigeration equipment (Iowa State University Extension). The source usually smells sour and fermented. Bag it and take it straight to the outdoor bin.
Check the drains you cannot see into
A drain can be the whole problem. To test one, tape a clear plastic bag or a sheet of plastic film over the opening overnight; if flies are breeding inside, adults will be trapped under it by morning. Both the Kentucky and Iowa State sheets recommend this check for drains and disposals.
Clean the drain, not just the sink
The flies live in the film of organic matter lining the pipe. Iowa State's advice is to clean the inside of the drain pipe: scrub a slow drain with a stiff brush, pour boiling water slowly down the sides of the pipe, or use a bacterial drain treatment that breaks down the organic matter. It also says there is no benefit to treating drains with bleach or ammonia. Do not pour boiling water into a drain connected to plastic pipes that are not rated for it; a long drain brush and a bacterial treatment do the job without the heat.
Clear the bins and the residue
Empty the kitchen trash and the recycling, then rinse the inside of both containers and let them dry. Rinse bottles, cans and jars before they go in the recycling from now on. Wipe up spilled juice or soda under and beside appliances, and replace or wash sour sponges, rags and mop heads, which the Kentucky sheet names as breeding sites in their own right.
Set a cider vinegar trap for the adults
Pour a few ounces of cider vinegar into a jar. Roll a sheet of paper into a funnel with a small opening at the narrow end and set it in the jar mouth, the trap the University of Kentucky sheet describes: flies go in toward the smell and rarely find their way back out. If you would rather use plastic wrap, stretch it over the jar, hold it with a rubber band and poke a few small holes with a toothpick. A single drop of dish soap in the vinegar breaks the surface, so flies that touch it sink instead of walking off. Put the trap where you have seen the most flies.
Keep checking, and empty traps into the toilet
Look at the trap each morning. A catch that drops off over a few days means the source is gone and you are mopping up adults. A catch that stays steady means something is still breeding: go back to step one. When you empty a trap, flush the contents rather than pouring them into the drain you have just cleaned, and refill with fresh vinegar.
Keep produce from becoming the next source
The Kentucky sheet's prevention advice is short: produce that has ripened should be eaten, thrown away or refrigerated. Keep ripe fruit in the fridge in summer, take the kitchen trash out often, and rinse recyclables before they go in the bin.
What about sprays?
Sprays are a last step, not a first one. The University of Kentucky sheet allows a pyrethrum-based aerosol for the adults that remain once the breeding sites are gone, and Iowa State calls household fly sprays temporary relief at best. Read and follow the label, and keep sprays away from food, dishes and prep surfaces. This is the logic of integrated pest management, the approach the EPA describes as preventing pests first and monitoring so that pesticides are not used when they are not really needed (EPA, Integrated Pest Management Principles).
Questions people ask
The flies are around my houseplants, not the fruit bowl. Is this the same problem?
Probably not. Small dark flies around potted plants are usually fungus gnats, whose larvae live in moist potting soil. UC IPM's advice is to avoid overwatering, let the surface of the soil dry between waterings, and use small yellow sticky cards in the pots for the adults (UC IPM, Fungus Gnats). A vinegar trap is aimed at fruit flies and is not the right tool here.
I cleaned everything and they keep coming back. What now?
Look for the source you have not found yet: a second drain, the drip pan under the refrigerator, a dishwasher or disposal, a forgotten bag of potatoes, a mop bucket, or a recycling bin in the garage or basement. Run the bag-over-the-drain test on every drain in the house. If a drain keeps producing flies after cleaning, the organic matter may be somewhere a brush cannot reach, such as a broken pipe, and that is a job for a plumber rather than more traps.
Can I use white vinegar in the trap?
Use cider vinegar, which is the bait the University of Kentucky sheet recommends. Flies are drawn to fermenting fruit, so a splash of wine or a piece of overripe fruit in the jar also works when you are out of cider vinegar.
Related
This guide sits in the kitchen cleaning section, next to the wider pest control hub. A kitchen arranged so fruit and produce are used rather than forgotten helps too: Sam's kitchen organized for the kitchen you actually have starts from what you reach for most. And if the drain that keeps breeding flies turns out to be a slow leak under the sink, the first hour of water damage covers what to do before the plumber arrives.