How to Get Rid of Fruit Flies: Find the Source, Then Trap the Rest

Traps catch the flies you see, but the real fix is finding the overripe fruit, sticky recycling or slimy drain where they lay eggs. Here is how to track it down and clear it out.

How to Get Rid of Fruit Flies: Find the Source, Then Trap the Rest
Photo: George Njukeng / Pexels

To get rid of fruit flies, find and remove what they are breeding in, usually overripe produce, a damp trash or recycling bin, or the slimy film inside a drain, then catch the remaining adults with a trap: a small glass of cider vinegar with a drop of dish soap, covered with plastic wrap poked with small holes. Once the breeding site is gone, fruit flies usually disappear within a week or two. Insecticide sprays are rarely needed.

Fruit flies lay eggs on moist, fermenting organic matter. Texas A&M AgriLife notes that their life cycle is about a week, which is why an infestation seems to explode and why it fades quickly once you remove the food source.

What you need

  • A flashlight
  • Small glasses or jars, cider vinegar (or a bit of overripe fruit or wine), dish soap and plastic wrap
  • A stiff drain brush or bottle brush
  • Dish soap and hot water
  • Sealed containers or the fridge for produce

Step 1: Find the source

Check these places, in roughly this order:

Likely source What to look for Fix
Fruit bowl and produce Soft bananas, tomatoes, onions, potatoes; a forgotten potato in a pantry bin Eat, refrigerate or discard; wipe the bowl
Trash can Liquid or residue in the bottom of the bin or under the liner Empty, wash with hot soapy water, dry, use a lid
Recycling Unrinsed bottles, cans, jars, wine or juice cartons Rinse before recycling; empty often
Drains Slimy film under the stopper or in the overflow Scrub with a drain brush (see below)
Garbage disposal Food stuck under the rubber flaps Clean the baffle with power off
Under appliances Spills, the fridge drip pan Clean spills; empty and wash the drip pan
Mops, sponges, rags Damp and sour-smelling Wash hot and dry, or replace

An Ohio State University Extension fact sheet on these “vinegar flies” points to rotting produce and also mentions drain water in refrigerators as a breeding source. Texas A&M AgriLife highlights spilled liquids in the bottom of trash cans.

Step 2: Clean the drains properly

Pouring things down a drain rarely removes the film flies breed in; scrubbing does.

  1. Remove the stopper or strainer and wash it.
  2. Scrub the inside of the drain with a stiff, narrow brush and hot soapy water, as far down as you can reach.
  3. Flush with hot water. Avoid boiling water if you have PVC pipes or a porcelain sink, as the manufacturer may advise against it.
  4. Repeat for a few days to catch any newly hatched larvae.

To check whether a drain is the source, tape a piece of clear plastic wrap loosely over it overnight. Flies trapped under it in the morning mean the drain needs more scrubbing. If you have a disposal, see cleaning a smelly garbage disposal; always switch off the power and never reach in with your hand.

Don’t pour bleach into drains to kill flies: it moves through quickly without removing the film, and bleach can react dangerously with other drain products or acids left in the pipes. Never combine drain cleaners, and see never mix these cleaning products.

Step 3: Trap the adults

Michigan State University Extension describes a simple trap that works well:

  1. Fill a small glass about two-thirds full with cider vinegar.
  2. Add a drop or two of liquid dish soap. Soap breaks the surface tension so flies sink instead of landing and leaving.
  3. Cover the top tightly with plastic wrap and poke a dozen or so small holes in it.
  4. Place traps near the fruit bowl, trash can or sink, where flies gather.
  5. Empty and refresh every few days.

Variations include a bit of overripe banana or leftover wine in place of vinegar, or a paper funnel in the jar mouth instead of plastic wrap. Read the full method on the MSU Extension page.

Why sprays usually aren’t needed

Sprays kill the adults in the air, but eggs and larvae in drains, bins and produce keep hatching, so the problem returns within days. Removing the source does the job, and the traps take care of the rest. If you still see flies after two weeks of clean drains and no exposed produce, look again for a hidden source: a broken jar at the back of the pantry, a spill under the fridge or a damp potato sack.

Keeping fruit flies away

  • Refrigerate ripe fruit, or buy smaller amounts more often.
  • Rinse bottles, jars and cans before they go into recycling.
  • Take out trash containing food scraps regularly, and wash the bin monthly.
  • Wipe up juice and wine spills right away.
  • Scrub kitchen drains weekly in summer and fall, when fruit flies peak.

Rinsing produce scraps off boards and counters right away helps too; see how to clean a cutting board.

Is it fruit flies or drain flies?

Fruit flies are small, tan to brown, often with red eyes, and hover around produce. Drain flies (also called moth flies) look fuzzy and gray, with moth-like wings, and rest on walls near sinks and showers. Both are fixed mainly by removing their breeding source, which for drain flies is almost always the drain film.

Bottom line

Find the breeding site first: overripe produce, sticky bins and recycling, and slimy drains. Clean it, scrub drains with a brush, and set a cider vinegar trap with a drop of dish soap for the adults. Within a week or two, the flies should be gone without any spray.

FAQ

Why does my fruit fly trap not work?

The holes may be too large, you may have skipped the dish soap, or the trap is far from where flies gather. Also, traps only catch adults; without removing the source, new flies keep appearing.

Does white vinegar work in traps?

Cider vinegar, wine or a piece of overripe fruit smell more like fermentation and usually attract flies better than plain white vinegar.

Can fruit flies come in on groceries?

Yes. Eggs or larvae can arrive on ripe produce. Refrigerating or washing fruit soon after you bring it home helps.

Are fruit flies harmful?

They are mainly a nuisance, but they move between garbage and food, so it is worth clearing them out and keeping food covered.