Guides

How to get rid of fruit flies (and keep them from coming back)

By Donny Hayati, biologist and founderOctober 14, 20267 min read
Kitchen counter with fruit bowl and sink

To get rid of fruit flies, find the spot where they are breeding (usually a drain, disposal, trash can, recycling bin or forgotten fruit), clean it out, refrigerate ripe produce, and keep the kitchen dry for about two weeks so existing eggs run their course. Traps thin out adults meanwhile. Deterrents go at the spots you want left alone.

Why do fruit flies keep coming back after I clean?

Because the flies you see are the smallest part of the problem. University of Kentucky entomologists put the fruit fly life cycle, egg to adult, at about a week in warm conditions, and a single female can lay around 500 eggs. Those eggs are not on your counter. They are in wet organic film: inside drains and garbage disposals, in the dregs of bottles and cans, in the bottom of the trash can, in a damp mop head or rag.

So you wipe the counters, toss the bananas, swat a few adults, and feel done. Two days later a fresh batch emerges from the drain and it looks like nothing happened. Nothing did happen, at least not where it mattered. The fix is not more effort. It is effort pointed at the right spot, kept up long enough to outlast the eggs already in the pipeline.

Where are the fruit flies actually coming from?

Fruit is the obvious suspect and sometimes the right one, but in a kitchen with no fruit out, the usual sources are, roughly in order:

  • The kitchen sink drain. Food particles build a slimy film on the pipe wall just below the strainer and in the trap. Flies hover at the sink and seem to appear from nowhere.
  • The garbage disposal. Same film, plus bits packed under the rubber splash guard.
  • Trash and recycling. Juice at the bottom of a bag, a beer can with a swallow left, a yogurt cup that did not get rinsed.
  • Produce. One soft onion in the back of the pantry, a potato going bad, a tomato that rolled behind the toaster.
  • Mops, sponges and rags. A wet mop head in a bucket is a breeding site. So is a sponge that never dries.
  • Under and behind appliances. A dried wine spill under the fridge or a splash of soda behind the trash can.
  • Indoor compost. A countertop crock with a loose lid.
  • Bathroom drains. There is no fruit in the bathroom, which is exactly why flies there point to the drain.

To confirm a drain, do the overnight tape test extension entomologists recommend: dry the drain opening, press a strip of clear tape across it sticky side down, leave a gap for air, and check it in the morning. Flies stuck to the underside tell you the drain is producing them. Test each drain separately, including the bathroom.

How long does it take to get rid of fruit flies?

Plan on two weeks of a consistent routine. The reason is simple arithmetic. If the cycle takes about a week, then whatever eggs were laid the day you started will still be emerging as adults seven days later, and anything they manage to lay before you catch up adds a few more days. A trap or a vacuum shortens the visible part by thinning adults, but the timeline is set by the eggs you cannot see.

If the swarm is still going strong after two solid weeks, you have missed a source. Go back to the list above and look harder at the one you skipped. It is often the recycling bin or a second drain.

What is the sanitation checklist that actually matters?

Extension guidance from Purdue and Texas A&M comes down to the same handful of moves: clear drains and disposals regularly, scrub drains with a stiff brush and flush with hot water, and refrigerate anything fermented or vinegar based. Here is that advice spread across a whole kitchen.

Spot What is attracting them What to do
Sink drain Organic film on the pipe wall Scrub with a stiff drain brush, flush with hot water, repeat nightly
Garbage disposal Food packed under the splash guard Lift the guard and scrub it, run the disposal with cold water and a tray of ice, then flush hot
Fruit bowl Ripening and bruised fruit Refrigerate anything ripe, eat or toss anything soft, wipe the bowl
Trash Liquid and scraps at the bottom Take it out nightly during an outbreak, wash the can, dry it before a new bag goes in
Recycling Residue in bottles, cans and cartons Rinse everything, keep the bin lidded, empty it more often
Sponges, rags, mops Wet fibers full of food Replace the sponge, launder rags, hang the mop to dry, empty the bucket
Dishes in the sink Overnight food residue Run the dishwasher or wash before bed, dry the sink
Under appliances Old spills Pull the fridge and stove out once and clean the floor
Compost Fermenting scraps Use a tight lid, empty daily, rinse the crock

Two habits do more than everything else combined: take out the trash every night and dry the sink before bed. A dry kitchen at midnight is a kitchen where nothing is laying eggs.

Where do traps fit?

Traps are honest tools as long as you know what they do. A jar of vinegar with a drop of dish soap catches adult fruit flies because they are drawn to the smell of fermentation. Becher and colleagues showed in 2010 that vinegar odor and acetic acid attract Drosophila melanogaster, which is exactly why the kitchen trick works. A trap pulls in adults and drowns them. That lowers the number of flies in the air and the number of eggs being laid this week.

What a trap cannot do is reach eggs or larvae. It will not touch the film in the drain or the juice in the trash. If the source is still there, the trap keeps filling and the swarm keeps coming. Use traps during the cleanup phase, place them close to where flies gather, refresh the vinegar every couple of days, and expect to retire them once the routine takes hold.

Where do deterrents fit?

A deterrent is the opposite of a trap. Instead of a smell flies like, it puts out a smell they avoid. The research here is at the ingredient level, and it is worth being precise about what it shows. Wang and colleagues reported in Pest Management Science in 2021 that peppermint oil, menthone and menthol repelled Drosophila melanogaster in lab tests, with stronger effects at higher doses. Renkema and colleagues reported in Scientific Reports in 2016 that peppermint oil kept spotted wing drosophila, a close relative, off a fruit juice bait in the lab for six days and held its scent longer than any of the twelve oils tested. Abed-Vieillard and colleagues found in 2014 that female flies laid about 70 percent of their eggs on plain food versus about 30 percent on menthol food. For clove, Baleba and colleagues in 2026 and Eben and colleagues in 2020 found that eugenol made spotted wing drosophila avoid fruit and lay fewer eggs. These studies tested the ingredients, not our products.

What that means in a kitchen: a steady peppermint or clove scent at the fruit bowl, the trash can or the sink is a reasonable way to make those spots less appealing for landing and egg laying. It is not a cleanup tool. Deterrents are for after the sanitation work, at the spots that drew flies in the first place, so those spots are less inviting next time. A few drops of oil on a cotton ball does the same thing for a few hours before it evaporates, which is why a slow release carrier matters.

What if I live in an apartment or share a wall?

Shared buildings add a wrinkle: you control your unit, not the trash chute, the neighbor's recycling or the building's drain stack. Fruit flies can and do move between units through hallways and shared spaces. That does not make your effort pointless. It means your own drains, trash and produce need to be clean enough that visitors find nothing to breed in, and then a deterrent at the sink and trash can earns its keep.

A few apartment specific moves: rinse recycling before it leaves your unit, do not leave trash bags in the hallway, run water in any drain you rarely use so the trap does not dry out, and tell management if the trash room or chute smells of fermentation. A building wide problem needs a building wide fix, but your kitchen can still be the one unit where the flies find nothing worth staying for.

What to do tonight

  1. Tape over every drain, kitchen and bathroom, and check in the morning.
  2. Scrub the kitchen drain with a stiff brush, flush with hot water, and run the disposal with ice.
  3. Put ripe fruit in the fridge and throw out anything soft or bruised.
  4. Take out the trash, wash the can, and rinse every item in the recycling.
  5. Replace the sponge, hang the mop, empty the bucket.
  6. Wash or load the dishes and wipe the sink dry.
  7. Set a vinegar trap with a drop of dish soap near wherever the flies gather.
  8. Put the routine on repeat for two weeks.

Where Fruit Fly Defense fits

We make two things, and neither replaces the list above. Deterrent Discs are natural wood discs hand soaked in 75 percent organic peppermint oil and 25 percent clove oil. One disc goes at each problem spot, the fruit bowl, the trash, the sink, stuck with the included velcro dot, and you replace it when the scent fades. The ingredient research described above is why we chose those two oils; those studies tested the ingredients, not our discs.

Sink Drops are peppermint oil, cedarwood oil, white vinegar and castile soap. Three to five drops go in each kitchen drain at night, in the drain where fruit flies can breed, as part of a nightly drain routine alongside the scrub and the hot water flush. We do not make an efficacy claim for the drops; they are a routine, not a treatment. The Starter Pack is three discs, the Combo Pack is three discs plus drops, shipping in the US is free, and there is a 30 day money back guarantee if the routine does not suit your kitchen.

Combo Pack
Combo Pack, $31

Discs for the counter plus Sink Drops that go in the drain, where fruit flies can breed and a trap never reaches. Free US shipping over $35 and a 30-day money-back guarantee.

Add to cart
Donny Hayati
Donny Hayati

Biologist (Miami University) and founder of Fruit Fly Defense in Greenville, SC. Every guide is written from the published research and our own kitchen. Questions? donny@fruitflydefense.com