Fruit fly repellent: what scents actually do, and what works instead

A few oils do push fruit flies away in a lab. None has been shown to clear a kitchen, because the flies you see are hatching out of your fruit bowl, bin or drain. Keep fruit in the fridge, clear what they breed on, and trap the adults with the smell they go to.

By The Pest GuyLast updated

The short answer

Repellents work on the fly in the air. Your problem is the fly in the fruit.

Some scents really do repel fruit flies. Peppermint oil, menthol and citronellal all made them move away in lab tests. But every one of those results came from a lab test, with flies choosing where to go in a cage or a tube. None of them shows a fruit fly repellent clearing a kitchen.

The reason is where the flies come from. Females lay their eggs on moist, unrefrigerated fruit and veg, in drains, compost buckets and wet mops. The eggs and the larvae feeding on them stay in that food. A smell on the windowsill does nothing to any of that. You can push the adults around the room while the next lot grows up in the bananas.

So the order that works is this. Find what they are breeding on and bin it or clean it. Put ripe fruit in the fridge. Then catch the adults that are left with the smell they cannot resist, which is cider vinegar.

What each scent was actually tested on

The lists of smells fruit flies hate never say which fly, or what the test was. Here it is, scent by scent.

Scents sold or recommended as fruit fly repellents, against what published studies found, which fly and setup they used, and the source
ScentWhat the study foundWhich fly, what setupSource
Peppermint oilKept almost all flies off a treated wick of raspberry juice, and stayed fully repellent for 6 days.Spotted wing drosophila, a crop pest, in a lab. In the field it cut infestation by 25% at 4 days and not at all by 7.Renkema et al. 2016, Scientific Reports; Renkema et al. 2017, Insects
Peppermint oil and mentholRepelled the kitchen fruit fly, more strongly at higher doses.Drosophila melanogaster in a lab test. No room-scale result.Wang et al. 2021, Pest Management Science
Lavender oilDeterred flies from a fly-food diet in a two-choice test. The authors say longevity needs more research.Spotted wing drosophila, in a lab.Gullickson et al. 2020, Insects
Citronellal (in citronella)Flies avoided the tube it was in.Drosophila melanogaster, two connected tubes, about 100 flies. A lab test of the compound, not a candle.Kwon et al. 2010, Current Biology
Lemon and other citrusThe opposite of a repellent. Females prefer citrus as the fruit to lay eggs on.Drosophila melanogaster, in a lab.Dweck et al. 2013, Current Biology
Cider vinegarThe bait. Extension services use it to lure flies into a trap.Drosophila melanogaster, in homes.University of Kentucky; University of New Hampshire Extension
Geosmin, the earthy smell of mouldFlies stop feeding and will not lay eggs on food carrying it, even mixed with fruit or vinegar smells.Drosophila melanogaster, in a lab. Not something anyone sells or should use in a kitchen.Stensmyr et al. 2012, Cell

Sources: Renkema and colleagues in Scientific Reports (2016) and Insects (2017); Wang and colleagues in Pest Management Science (2021); Gullickson and colleagues in Insects (2020); Kwon and colleagues in Current Biology (2010); Dweck and colleagues in Current Biology (2013); Stensmyr and colleagues in Cell (2012); and the fruit fly fact sheets from the University of Kentucky and the University of New Hampshire Extension. Basil, cloves and eucalyptus appear on most scent lists with no study cited for them, so they get no row.

Why the lab result does not reach your kitchen

The best repellent result on record lost most of its effect once it left the lab.

Peppermint oil is the strongest case anyone has made. In a 2016 lab screen of twelve oils, it kept almost all flies off a cotton wick soaked in raspberry juice, and stayed fully repellent for six days. That is the number the scent lists are leaning on, whether they know it or not.

Two things get left off. The fly was spotted wing drosophila, a pest of soft fruit crops, and not the fruit fly in your kitchen. And when the same team took peppermint and thymol out to a strawberry field, infestation dropped by 25% at four days and not at all by seven. Lavender oil went the same way in a separate study: it deterred flies in a two-choice lab test, and the authors said more work is needed on how long it lasts.

There is one result on the kitchen fruit fly itself. A 2021 study found peppermint oil and menthol repelled it, more strongly the higher the dose. That is a real effect. It is still a lab test, and it still does nothing to eggs already laid.

The fruit fly fact sheets from the University of Kentucky and the University of New Hampshire do not mention scents at all. Kentucky's says unless the breeding sites are removed or cleaned, the problem will continue. New Hampshire's goes further: fruit flies breed so quickly that sanitation is the only effective means of control.

Vinegar and lemon: two repellents that pull them in

Two of the most-repeated tips work the wrong way round.

Vinegar turns up on lists of smells fruit flies hate, sometimes on the same page as a vinegar trap. It is the bait. Fruit flies find food by smell and lay their eggs in fermenting fruit, and cider vinegar is what extension services put in the jar to lure them in. Spray it round the kitchen and you are laying a trail. Put it in a trap instead: what the cider vinegar is actually doing explains the pull.

Lemon is the surprise. A 2013 study in Current Biology found the kitchen fruit fly prefers citrus as the fruit to lay its eggs on, and it has a dedicated smell receptor for the compounds typical of citrus fruit. The authors think it is because the smell of citrus drives off the parasitic wasps that attack fruit fly larvae. Either way, a half lemon on the worktop or a clove-studded orange is a place to lay eggs, not a deterrent.

The smell fruit flies really do avoid is the one you would bin anyway. Geosmin is the earthy smell of mould and bacteria. Fruit flies have a nerve pathway that does nothing but detect it, and they will not feed or lay eggs on food carrying it, even when it also smells of fruit and vinegar. They are not avoiding herbs. They are avoiding food that has gone bad, and laying in food that is just about to.

What does keep fruit flies away

Every step here comes from extension advice, and none of them involves a scent.

Put ripe fruit and veg in the fridge. Females lay on moist, unrefrigerated produce. Cold fruit is fruit they are not breeding in. It is the closest thing to a repellent with a source behind it.

Find what they are breeding on now. New Hampshire's list is a good one to walk round the kitchen with: the rotting onion or potato in the cupboard, spilt juice in the tray under the fridge, apple cores in the kids' bin. The flies seem to appear from nowhere because the eggs came in on the fruit, which is the whole story of where fruit flies come from. Hunting down the rest, room by room, is what finding fruit flies in the house covers.

Rinse the recycling and clean the bins. Bottles, cans and food containers go in rinsed, and the bin and the caddy get washed out. Kentucky adds drains, mops and cleaning rags to the list of places they breed.

Then catch the adults. The flies already in the air will keep laying until they are gone. A cider vinegar trap by the fruit bowl does that job, and what makes a fruit fly trap catch and keep them is worth reading before you buy or make one. A spray kills what it hits and nothing that hatches tomorrow, which is the argument in fruit fly spray.

One check before any of this. If the tiny flies are round a plant pot rather than the fruit bowl, they may be fungus gnats, which need a different fix. The difference is set out in fruit flies vs fungus gnats, and if it is bigger flies in bigger numbers, flies in the house is the place to start.

Use the smell they go to, not the one they avoid

For fruit flies, once you have cleared what they are breeding on. Fill it with about 25 ml of cider vinegar and a drop of washing-up liquid, stand it next to the fruit bowl or the food bin, and the flies follow the smell down a funnel and through one 4 mm hole. There are no refill packs to buy, just more vinegar. If the flies are coming from a plant pot or a drain, find that source first.

What I’d use

Reusable cider vinegar trap

Escape-proof fruit fly trap

A two-part cup and lid you fill with about 25 ml of cider vinegar and stand by the fruit bowl.

Eight slots in the lid feed a funnel that drops flies through one 4 mm hole into the dark middle of the cup. The brightest points a trapped fly can see are pinholes too small to get through, set away from the real exit, so the way out is the place they are least likely to look.

Ways in
Eight slots in the lid, into one funnel
Way out
One 4 mm hole, under the solid centre of the lid
Holds
About 25 ml of vinegar, to the moulded fill line
Size
6.7 cm across, 5.4 cm tall
Refills
None to buy. It runs on cider vinegar from the cupboard

Watch out for

  • Vinegar and washing-up liquid not included.
  • Made for fruit flies. Flies from a plant pot or drain need the source found.
  • Tip, rinse by hand and refill once it fills up.
Check the price on eBay

That link earns me nothing. It is not an affiliate link, no brand pays for a mention here, and I get the same whether you buy this or ignore it. It is on the page because it is what the job takes.

No brand pays for a mention here, and nothing on this page earns me a commission. The card above links out to a shop, and I get the same whether you buy or ignore it. The link is there because finding the thing is the boring half of acting on advice, which is also why the watch-outs sit on the same card as the reasons to buy.

About this resource

The weight here is carried by the fruit fly fact sheets from the University of Kentucky and the University of New Hampshire Extension, and by six published studies on how fruit flies respond to smells, named under the table. Where a study was on spotted wing drosophila rather than the kitchen fruit fly, the page says so.

The honest limit: I have not found a published test of a scent clearing fruit flies from a real kitchen, so this page cannot tell you one works. It can tell you what was tested and where the evidence stops. More on the whole job, start to finish, is in how to get rid of fruit flies.

Common questions

What is the best repellent for fruit flies?

The best published result is peppermint oil, which kept almost all flies off a treated wick for six days in a lab. That was spotted wing drosophila, a crop pest, and in the field the same team got a 25% cut in infestation at four days and nothing at seven. For the fruit fly in your kitchen, the thing that actually keeps eggs off your fruit is the fridge: they lay on moist, unrefrigerated produce.

What smells make fruit flies go away?

In lab tests, peppermint oil, menthol and citronellal all made the kitchen fruit fly move away from them. The smell it has a dedicated alarm for is geosmin, the earthy smell of mould and bacteria, which tells it the food has gone bad. None of that has been shown to clear flies from a room, because the flies keep hatching from whatever they are breeding on.

What do fruit flies absolutely hate?

Food that has gone mouldy. Fruit flies have a dedicated nerve pathway for geosmin, a smell given off by mould and bacteria, and they will not feed or lay eggs on food carrying it even when it also smells of fruit or vinegar. The herbs on most lists (basil, cloves, eucalyptus) come with no study cited for this fly.

What is the best way to keep fruit flies away?

Take away what they breed on. Put ripe fruit and vegetables in the fridge, rinse bottles and cans before they go in the recycling, keep the bin and the food caddy clean, and check the drain. Extension entomologists put it bluntly: sanitation is the only effective means of control, because they breed so quickly.

What kills fruit flies overnight?

Nothing kills the eggs and larvae already in the fruit overnight, which is why the source has to go in the bin. For the adults already flying, a cider vinegar trap catches them while you sort the source. Kentucky entomologists describe a paper funnel in a jar of cider vinegar as a simple, effective way to catch the remaining adults.

Does lemon or vinegar repel fruit flies?

No, both pull them in. Cider vinegar is the standard bait in fruit fly traps. And a 2013 study in Current Biology found the kitchen fruit fly prefers citrus as the fruit to lay its eggs on, so a cut lemon on the side is closer to a nursery than a deterrent.