On this page

How to Get Rid of Fruit Flies: Traps Tested, Drains Fixed

·

Share X Facebook LinkedIn WhatsApp
How to Get Rid of Fruit Flies headline with a 14-day countdown to the last adult

The fastest answer to how to get rid of fruit flies is to stop treating the flies and start treating the food they breed in. Every adult hovering over the fruit bowl hatched from a damp, fermenting spot somewhere in the house, and as long as that spot exists, traps and sprays only thin the crowd.

Extension entomologists at Kentucky, Texas A&M, Purdue and Colorado State agree on the method in 2026: confirm the fly, find the source, clean drains mechanically, trap the survivors, then wait out the last generation. Below are the numbers behind each step, the homemade trap design that caught the most flies in a side-by-side test, and a two-week plan.

The Short Answer: Remove the Source, Then Trap the Adults

Fruit flies lay eggs on fermenting produce, in drain slime, in damp mops and in unrinsed bottles. Remove or scrub every one of those spots, set apple cider vinegar traps with a drop of dish soap, and refrigerate ripe produce. With no new adults emerging, the remaining flies die off in about two weeks.

Confirm It Is a Fruit Fly Before You Start

Common fruit fly with a red compound eye and banded abdomen against a dark background
Image: University of Maryland Extension

Fruit flies belong to the Drosophilidae family, the vinegar and pomace flies. The University of Maryland describes the household species as about 1/8 inch long with red eyes, and Texas A&M adds a detail you need a magnifier for: a feathery bristle on the tip of each antenna that other small indoor flies lack. The red eyes can fade after the fly dies, so check a live one.

Three other small flies get mistaken for fruit flies, and each breeds somewhere different:

  • Fungus gnats look like tiny black mosquitoes with long legs. They live in wet potting soil, so they cluster around houseplants and windows. Letting the soil surface dry between waterings ends them.
  • Drain flies (moth flies) are fuzzy and gray with wings folded like a roof. They rest on walls near sinks and showers and breed in the gelatinous film inside drains.
  • Phorid flies have a humped back and no red eyes, and they run across counters instead of flying off. NC State Extension’s phorid fly guide notes a single female can produce more than 700 eggs.
Fuzzy gray drain fly with hairy wings resting on a fingertip for scale
Image: Clemson Cooperative Extension

The fuzzy fly above is a drain fly, which Clemson Extension says can be carried by wind up to 300 feet. If that is what you see, the fix is almost entirely in the drain section below, and vinegar traps will do little.

Where Fruit Flies Come From in a Clean Kitchen

Iowa State Extension makes a point that surprises many people: fruit does not need to be present for fruit flies to breed. The most likely home breeding site, it says, is a slow or seldom-used drain with a layer of slime above the water line. Any moist film of fermenting material is enough.

The University of Kentucky puts the scale in perspective. One rotting potato or onion forgotten at the back of a closet, juice spilled under the refrigerator, or a basement recycling bin that never gets emptied can breed thousands of flies. The usual hiding places include:

  • The bottom of a potato or onion bag, where one soft piece goes unnoticed
  • Trash cans whose liners leaked, leaving a sticky film underneath
  • Recycling bins with unrinsed wine, beer, soda or ketchup bottles
  • Damp mops, brooms, dish rags and sponges
  • The drip tray under the refrigerator
  • Apple cores and juice boxes in children’s wastebaskets
  • Loosely capped vinegar, wine, cider and home-brew containers

New flies also arrive from outside. Some produce comes home already carrying eggs, and adults slip through ordinary window screens, which is why the University of Kentucky recommends tight 16-mesh screening. Fall is peak season: tomatoes, melons, squash and grapes from the garden start many indoor infestations, and the pulp left from pumpkin carving belongs in a sealed outdoor bin, not the kitchen trash.

The Fruit Fly Life Cycle in Numbers

A fruit fly population can double several times over in a month because every stage is short. Figures from the University of Kentucky, Ohio State and the University of Maryland:

StageHow long it lastsWhat happens
Egg24 to 30 hoursLaid singly on the surface of fermenting food; a female lays about 500, up to 2,000
Larva5 to 6 daysWhitish, legless, about 1/4 inch; feeds on yeast in fermenting fluids
PupaA few daysLarvae crawl to a drier spot nearby before pupating
AdultAround 1 monthReady to mate in about 2 days; can fly up to 6.5 miles in 24 hours
Egg to adult8 to 10 days at 77 FRanges from 8 to 20 days depending on room temperature

That eight to ten day turnaround is why a few flies on Monday can become a cloud by the following weekend. It also explains why the clean-up has to last about two weeks: any eggs already laid will still hatch and mature after the source is cleaned, and those adults need time to be caught or die off.

Homemade Fruit Fly Traps Compared

Four homemade fruit fly traps on a windowsill: a plastic-wrap jar, a paper-cone jar, a lidded jar and a wine bottle
Image: The Kitchn

The Kitchn tested four homemade designs side by side, each baited with about 1/4 cup of apple cider vinegar and a few drops of dish soap. The traps were set on a Monday and checked on Friday:

Trap designFlies caught in four daysNotes
Jar with holes punched in a metal lidAt least 50Best performer; small holes let flies in but rarely out
Jar covered in plastic wrap with holesAbout 8 to 10Easy to make; holes can tear wider over time
Wine bottle with dregs and soap4 to 5Narrow neck works, but the bait is weaker
Paper cone in a jarVery fewThe classic extension design underperformed in this test

The lesson is the entrance. Small, rigid holes let flies find their way in while making the exit hard to locate. To build the winner, punch four or five holes in a canning jar lid with a nail, add the vinegar and soap, and screw it on. The soap matters because it breaks the surface tension, so a fly that lands sinks instead of drinking and leaving.

Bait choice is worth testing too. Texas A&M lists wine, banana slices, orange slices and cider as working alternatives, and notes that a small amount of yeast makes any bait stronger. Replace fermenting baits every few days, since they lose pull as they dry out.

Why Vinegar and Banana Work: What the Research Says

Fruit flies are not really after fruit. A 2012 study by Becher and colleagues in Functional Ecology found that baker’s yeast alone was enough to attract the flies, trigger egg-laying and support larval growth, while yeast-free grapes did not support larvae. A blend of five yeast odor compounds attracted flies as well as fermenting grape juice.

Vinegar works for a related reason. A 2015 paper in Applied and Environmental Microbiology identified acetic acid as the main attractant in vinegar and showed that a compound called acetoin boosts it: in a cage of about 1,500 flies, a high-acetoin vinegar culture caught up to 37 percent of them in 45 minutes. Outdoors, a 2019 Texas A&M student study ranked seven baits over eight days and found banana beat apple cider vinegar, which beat wine and beer. If one bait stalls, switching to a ripe banana with a pinch of yeast is a sound next move.

How to Clean a Drain That Breeds Fruit Flies

First, prove the drain is involved. The University of Kentucky’s test is simple: tape a clear plastic food bag over the drain or disposal overnight. Flies trapped inside the bag in the morning confirm it.

Then clean it in a way that actually removes the larvae:

  1. Pull out the stopper and strainer and wash them separately.
  2. Scrub the inside of the pipe and trap with a stiff, long-handled drain brush to break up the slime film.
  3. Pour hot to boiling water slowly down the sides of the pipe.
  4. For pipes the brush cannot reach, use a biological or enzyme drain product. Texas A&M notes these often need repeat applications over several weeks; confirm septic compatibility.
  5. Repeat the bag test after a few days.

Skip the bleach. Texas A&M calls bleach and drain cleaner “largely ineffective” against drain films, Iowa State says there is no benefit to treating drains with bleach or ammonia, and NC State warns that bleach poured down drains can react dangerously with other compounds. The film has to be scrubbed or digested, not disinfected.

How to Get Rid of Fruit Flies for Good: A 14-Day Plan

Colorado State University’s drosophilid fly guide gives the timeline: once breeding sites are eliminated, numbers should fall within several days, and after about two weeks all remaining adults will have died. Here is how to use that window:

  • Day 1: Remove overripe produce, empty and wash the trash and recycling bins, hang mops to dry, wipe under the fridge, and set three or four vinegar traps.
  • Day 2: Run the overnight bag test on every drain and the disposal.
  • Days 2 to 4: Scrub any drain that produced flies and start a biological drain product if needed.
  • Days 4 to 7: Refresh trap bait. Numbers should be visibly lower.
  • Days 7 to 14: Keep produce in the fridge and recycling rinsed. Expect a few stragglers.
  • Day 14: If flies are still emerging, a source remains. Recheck drains, appliances and stored potatoes or onions.

A kitchen that stays dry and wiped down is the long-term fix. Machine-washable cloths that dry quickly, like those in our guide to the best microfiber cleaning cloths, avoid the sour, damp sponge that fruit flies love.

Sprays, Zappers and Store-Bought Traps

Sprays are a last resort. Texas A&M says insecticides alone are rarely successful and should not be needed once breeding areas are clean, while the EPA’s pest management guidance for child care centers says pesticides are rarely needed for flies at all. A pyrethrin aerosol kills adults on contact but does nothing to eggs or larvae.

Store-bought traps use the same vinegar-type lures and are useful where a jar would get knocked over, and Texas A&M notes commercial low-odor lures can last as long as a week. Avoid electric bug zappers indoors; they scatter insect fragments.

Frequently Asked Questions

Why do fruit flies keep coming back?

Because a breeding spot survived. A slimy drain, a damp mop or one bad onion can keep producing new adults every eight to ten days. Use the overnight bag test on drains and check the places listed above.

Can fruit flies make you sick?

They are mainly a nuisance, but the University of Kentucky and Penn State note they can contaminate food with bacteria and other disease organisms. Throw away produce that has larvae in it, or cut away the damaged part.

What is the best bait for a fruit fly trap?

Apple cider vinegar with dish soap is the standard. In a Texas A&M student study, ripe banana attracted more flies than vinegar, wine or beer, and adding a pinch of yeast strengthens any bait.

Do fruit flies die in winter?

Outdoors, Ohio State says they disappear when cold weather arrives. Indoors, warm kitchens let them breed year round, which is why the University of Minnesota sees them often in fall and winter homes.

Related Articles

Latest posts