How to Get Rid of Fruit Flies for Good, Not Just Today
Getting rid of fruit flies takes two steps that have to happen together: eliminate the breeding site and trap the adults still flying. A bowl of apple cider vinegar with a drop of dish soap catches the adults within hours, but it accomplishes nothing lasting if a forgotten potato in the back of a cupboard keeps producing new ones every few days.
The reason infestations feel unstoppable is arithmetic. A single female lays around 500 eggs, and the cycle from egg to breeding adult takes as little as eight to ten days in a warm kitchen. This guide covers where they actually come from, the trap recipe that works and why, how to find the breeding source, what to do about drains, how to tell fruit flies from fungus gnats and drain flies, and which popular remedies do nothing at all.
| Quick Facts | Fruit Flies |
|---|---|
| Species | Drosophila melanogaster and relatives |
| Size | About 0.125 in, tan to brown, often red eyes |
| Egg to adult | 8 to 10 days at room temperature |
| Eggs per female | Around 500 |
| Adult lifespan | 40 to 50 days |
| Main breeding sites | Ripe fruit, drains, bins, damp cloths, spills |
How to Get Rid of Fruit Flies Fast
Work both ends of the problem at once. Set traps to remove the adults you can see, and simultaneously hunt down and eliminate whatever they are breeding in, because trapping alone never resolves an infestation that has an active source.
Start by clearing every piece of exposed produce from counters, either refrigerating it or sealing it in bags. Empty and wash the bin, wipe down counters and the areas under appliances, run the disposal, and deal with the recycling. Then set two or three vinegar traps at the points where you see the most activity.
Expect visible improvement within a day and full resolution in one to two weeks. That timeline is set by the life cycle, since eggs already laid will continue hatching for several days after you remove the source. Persistence past the first quiet day is what prevents the rebound most people experience.
Where Fruit Flies Actually Come From
They almost always arrive on produce. Fruit flies lay eggs on the surface of ripening fruit and vegetables, and those eggs are microscopic and survive the trip from orchard to store to your kitchen counter. A bunch of bananas that looked clean at the checkout can produce a cloud of flies four days later.
They also fly in through windows and door gaps, since the insects are strongly attracted to fermentation odors and can detect them from a considerable distance. An open compost bin, a recycling container with unrinsed bottles, or a bin on a warm porch works as a beacon.
Once inside they breed anywhere with moist fermenting organic material. Common sites include the film inside drains, the bottom of a bin, a spill under the refrigerator, the water tray beneath potted plants, a damp mop or dishcloth, a nearly empty wine or beer bottle, and the wet lip of a garbage disposal. The moisture matters as much as the food, which is why drains feature so heavily.
The Apple Cider Vinegar Trap

The standard trap is a small bowl or jar with about an inch of apple cider vinegar and a single drop of dish soap, stirred in gently. Place it where the flies are most active, usually near the fruit bowl or the sink, and leave it. Refresh every few days.
The soap is what makes it work, and skipping it is the most common mistake. Fruit flies land on liquid surfaces and drink without sinking, because surface tension holds them up. A drop of detergent collapses that tension so the insects break through and drown instead of feeding and flying off.
Several variations work equally well. A jar covered with plastic wrap punctured with a few small holes lets flies in and makes exit harder. A paper cone taped into a jar neck does the same. Overripe fruit or a splash of wine or beer substitutes for vinegar, since the attractant is the fermentation odor rather than the vinegar itself. Set several small traps rather than one large one, because coverage matters more than volume.
Finding the Breeding Site
This is the step people skip and the reason infestations recur. Search systematically rather than hoping the traps will do the work, and check everything in a kitchen that could hold moist organic matter.
Work through the obvious first: fruit bowls, potatoes and onions in a pantry basket, the bottom of the bin including under the liner, the recycling, the compost caddy, and the disposal. Then move to the less obvious: under and behind the refrigerator and stove, the drip tray beneath a refrigerator, the cracks where counter meets wall, the mop head, the dishcloth, and the sponge.
Potted plants deserve their own check, since standing water in a saucer or persistently wet potting soil breeds both fruit flies and fungus gnats. Pet food and water bowls, the bottom of a pet food container, and a rarely used sink or floor drain in a basement or utility room round out the list. One overlooked source keeps the entire cycle running.
Cleaning Drains Properly
Drains are the most common hidden source, because the biofilm coating the inside of the pipe is exactly the moist fermenting material fruit flies breed in. The insects live in that film rather than in the water, which is why pouring things down the drain usually fails. University extension entomology programs consistently identify drains as the most commonly missed breeding site in persistent kitchen infestations.
Mechanical cleaning is what works. Use a stiff drain brush to physically scrub the inside of the pipe as far down as you can reach, then follow with an enzyme-based drain cleaner formulated to digest organic buildup, applied at night when the drain will not be used for several hours. Repeat over several days.
Bleach and boiling water are the popular answers and both disappoint. They flush straight through without dwelling long enough to remove the film that the larvae live in, and bleach damages some plumbing and creates hazardous fumes when mixed with other cleaners. To confirm a drain is the source, tape a piece of clear plastic over it overnight, sticky side down, and check in the morning for flies stuck to the underside.
Fruit Flies, Fungus Gnats, and Drain Flies
Three different insects get called fruit flies and they need different responses. True fruit flies are about 0.125 in, tan to brown with often-red eyes, hover around fruit and bins, and fly in a slow bobbing pattern.
Fungus gnats are darker, more slender, with long legs and a mosquito-like look, and they come from the soil of overwatered houseplants. They fly weakly and erratically and are usually seen near windows and plants rather than food. The fix is watering less and letting the top inch of soil dry between waterings, which our guide to getting rid of gnats covers in full.
Drain flies, sometimes called moth flies, are fuzzy, moth-like, and hold their wings tented over the body. They breed exclusively in drain biofilm and sewage, and they indicate a plumbing issue rather than a food issue. If small dark flies are emerging in numbers from a floor drain or appearing near a bathroom rather than a kitchen, they are probably not fruit flies at all.
Prevention That Actually Holds

Refrigerate ripe produce rather than displaying it. This single habit prevents most infestations, since a fruit bowl on a warm counter is a breeding platform. Bananas and tomatoes that suffer in the fridge can go in a sealed container or a paper bag.
Wash produce when it comes home, since rinsing removes surface eggs before they hatch. Take the bin out regularly and wash it periodically rather than only replacing the liner, rinse recyclable bottles and cans before they go in the container, and keep the compost caddy sealed and emptied.
Then handle the moisture. Wipe spills immediately, dry the sink at night, wring out and dry cloths and sponges rather than leaving them damp in the sink, and empty plant saucers. Fitting screens on windows and a sweep on the back door keeps outdoor populations outdoors, which matters most in late summer when fallen fruit outside produces enormous numbers.
What Does Not Work
Ultrasonic pest repellers do nothing. They are marketed against everything from rodents to insects, and controlled testing has repeatedly found no effect on fruit flies or on most other targets.
Aerosol insecticides give the illusion of progress by killing visible adults, but they leave eggs and larvae untouched and the population rebounds within days. Spraying insecticide around food preparation surfaces also introduces a contamination risk for no lasting benefit. Scented candles, essential oil diffusers, and herb bundles have no meaningful repellent effect at the concentrations involved.
Bug zappers are ineffective against fruit flies specifically, since these insects are drawn to fermentation odors rather than to ultraviolet light, and outdoor zappers kill large numbers of harmless and beneficial insects while barely touching the target. Fly paper catches some adults but works no better than a vinegar trap and looks worse. None of these approaches addresses the breeding site, which is the only thing that ends an infestation.
When It Is Not Fruit Flies
Phorid flies, also called humpbacked flies, look superficially similar but run erratically across surfaces rather than flying when disturbed, and they show a distinct hump behind the head. They matter because a persistent indoor phorid population often indicates a broken sewer line, a dead animal in a wall, or organic matter accumulating under a slab.
The distinguishing sign is location and persistence. Phorid flies that keep appearing in a bathroom or basement despite thorough cleaning, with no food source anywhere nearby, warrant a plumbing inspection rather than more traps. This is a genuine building problem rather than a housekeeping one.
Moths indoors are a separate matter again, as our guide to the white moth explains for the pantry and closet species. Small flies swarming around windows in autumn are more likely cluster flies seeking overwintering sites, and tiny beetles mistaken for flies belong to different groups entirely, as our guides to carpet beetle bites and the black beetle explain. Getting the identification right first saves weeks of applying the wrong fix, the same principle that runs through our guide to getting rid of earwigs.
Frequently Asked Questions
What is the fastest way to get rid of fruit flies?
Set apple cider vinegar traps with a drop of dish soap to catch adults, and simultaneously find and remove the breeding source. Clear exposed produce, empty and wash the bin, and clean drains. Expect improvement within a day and full resolution in one to two weeks.
Where do fruit flies come from?
Usually on produce, since eggs laid on ripening fruit survive the trip from store to kitchen. They also fly in through windows and doors, drawn by fermentation odors. Once inside they breed in drains, bins, spills, damp cloths, plant saucers, and nearly empty bottles.
Why do I need dish soap in the vinegar trap?
Surface tension lets fruit flies land on liquid and drink without sinking. A single drop of detergent collapses that tension so they break through and drown. A trap without soap feeds the flies rather than catching them.
How do I know if fruit flies are breeding in my drain?
Tape clear plastic over the drain overnight, sticky side down, and check for flies stuck underneath in the morning. If confirmed, scrub the pipe mechanically with a drain brush and use an enzyme cleaner overnight. Bleach and boiling water flush through too quickly to remove the biofilm.
How long do fruit flies live?
Adults live 40 to 50 days, and the full cycle from egg to breeding adult takes only 8 to 10 days at room temperature. A single female lays around 500 eggs, which is why populations explode so quickly and why removing the breeding site matters more than killing adults.
What is the difference between fruit flies and fungus gnats?
Fruit flies are tan to brown, often with red eyes, and hover around fruit and bins. Fungus gnats are darker, slender, long-legged, and mosquito-like, and they emerge from overwatered houseplant soil near windows. Gnats are fixed by watering less, not by vinegar traps.
Do ultrasonic repellers or bug zappers work on fruit flies?
No. Ultrasonic devices have repeatedly failed controlled testing, and zappers attract insects with ultraviolet light while fruit flies orient to fermentation odors. Aerosol sprays kill visible adults but leave eggs and larvae, so the population rebounds within days.