Homemade fruit fly trap: what works, and why most of them leak

A jar, cider vinegar and a drop of washing-up liquid will catch fruit flies. The bit nobody explains is how they get back out: through the light, through a gap, or off a bait that never drowned them. Fix those three and the homemade trap does its job.

By The Pest GuyLast updated

The short answer

Build the way out small, low and in shadow, and give them something to drown in.

The best homemade fruit fly trap is a jar with cider vinegar in the bottom, one drop of washing-up liquid, and a paper cone taped into the top. Fruit flies follow the smell down the cone, drop through the small hole at the tip, and the washing-up liquid means the ones that land on the vinegar sink instead of standing on it.

Most homemade traps catch flies. Where they fall down is keeping them. Fruit flies are drawn to light, and the usual cling film lid puts the holes in the brightest part of the jar, right where a trapped fly goes looking. Gaps round a cone do the same job from the side. So the fix is about where the exit is, more than which vinegar you pour.

No cider vinegar? White vinegar, red wine or a few slices of very ripe banana all work. Sugar water barely does. And a trap only ever catches adults. If you have not found what they are breeding in, start with finding the source in your house, or the trap fills up and the flies keep coming.

Which bait catches the most fruit flies

One study put seven household baits side by side and counted the flies in each trap every two days.

Fruit flies caught by seven household baits after two days and after eight days, with what the count means
BaitFlies by day 2Flies by day 8What it tells you
Apple cider vinegar923Fastest start: 39% of its catch came in the first two days
Banana slices536Most by day 8, and still climbing as it rotted
Mushroom slices026Nothing at first, then rose as it rotted
Wine (merlot)313Just over half the cider vinegar total
Beer28Weaker than wine
Sugar syrup16No fermentation smell, so little pull
20% sugar water02The weakest bait tested

Source: Salin (2019), Instars: A Journal of Student Research, Texas A&M University. One trap per bait, outdoors, checked every two days for eight days. Each trap was a small bowl under clear cling film with small pinhead holes, and every liquid bait had a few drops of washing-up liquid in it. Read it as a direction: one trap per bait is a small test.

Two things in those numbers are worth acting on. Cider vinegar works straight away: it caught 9 flies in the first two days, which was 39% of everything it caught. Fruit starts slowly and gets better as it rots, which is why the banana was behind at day two and miles ahead at day eight.

So use both. Cider vinegar for the quick start, and a small piece of very ripe banana in it for the pull that builds. A study in Functional Ecology found that yeast fermenting on its own drew fruit flies as well as yeast fermenting on fruit, and that the smell of the fruit itself was only of secondary importance. It is the fermentation they follow, and both baits are fermenting. There is more on why cider vinegar in particular works on the apple cider vinegar page.

Three homemade traps, and how to build each one properly

Each one has a single detail that decides whether it holds flies.

The paper cone in a jar

The University of Kentucky's version: roll a sheet of paper into a funnel, stand it in a jar, and bait the jar with a few ounces of cider vinegar or a slice of banana. Thomas Merritt, a chemistry professor at Laurentian University, adds the detail that matters: tape the funnel in place so there are no gaps for the flies to crawl out. Keep the hole at the tip small, and keep the tip clear of the vinegar so flies have to drop to reach it.

The jar with cling film and holes

The University of Maryland Extension's version: cider vinegar in the bottom of a glass jar, a drop of washing-up liquid, cling film or a small food bag stretched over the top and held tight with a rubber band, then one tiny hole poked through. Tiny is the word they use and it is the right one. A hole you can see light through easily is a hole a fruit fly can find again.

The open bowl

A bowl or glass of cider vinegar with a drop of washing-up liquid stirred in, no lid at all. It works only because of the washing-up liquid, which lowers the surface tension so a fly that lands gets stuck and drowns. Without it they can stand on the vinegar and fly off again. Stand it right beside the fruit bowl or the food bin.

Whichever you build, change the vinegar every day or two, which is Merritt's own advice, and keep it where you see the flies rather than where it looks tidy.

Why the jar and cling film trap lets flies back out

Fruit flies go towards light. In most homemade traps, the light is where the exit is.

The underside of a white plastic trap lid, showing a cone-shaped funnel rising to a single small hole at its tip.
What a cling film lid is missing: the exit sits at the tip of a funnel, low and in the shade of the lid, not up in the light where a trapped fly goes looking.

The extension factsheet the University of Rhode Island adapted from Ohio State says it plainly: newly emerged fruit flies are attracted to light. Now look at a jar with cling film on top. The sides might be glass, but the clearest, brightest surface a trapped fly can see is the film over its head. That is where it goes, and the holes are in it. The trap puts its only way out in the one place a fly is most likely to search.

Ohio State's own jar trap is built the other way round. The jar goes upside down over the bait, the third nearest the opening is painted black or covered in paper, and after feeding the flies fly upwards to the light end, where a sticky coating on the glass holds them. The exit is in the dark and the light is somewhere they cannot leave from. Copy that. Wrap a band of paper or tape round the top of your jar so the holes sit in shadow, and leave the lower glass clear.

The other two leaks are simpler. A paper cone with gaps round the rim is a door left ajar, which is why Merritt tells you to tape it. And a trap baited with fruit and no liquid does not kill anything. In the bait study above, the flies in the fruit traps could go about their lives inside, and could breed in the bait. With an egg-to-adult cycle of about a week, a forgotten banana trap ends up hatching the next batch.

Four homemade fruit fly traps, where each one lets flies out or fails to kill them, and the fix for each
Homemade buildWhere it leaksThe fixSource
Jar with cling film and holesThe holes sit in the clear film on top, which is the brightest part of the trap, and fruit flies head for lightKeep the holes tiny, and wrap the top of the jar in paper or tape so the exit is in shadowUniversity of Maryland Extension; URI / Ohio State factsheet
Paper cone in a jarGaps where the cone meets the rim, and a tip cut too wideTape the cone all round the rim and keep the hole at the tip smallThomas Merritt, Laurentian University; University of Kentucky
Open bowl of vinegarNo lid, so it only holds the flies that touch the liquid. Without soap they can stand on itOne drop of washing-up liquid, so a fly that lands sinksSalin (2019)
Fruit under cling film, no liquidNothing drowns them. Trapped flies can live and breed in the baitPut the fruit in vinegar with a drop of washing-up liquid, and bin it within a weekSalin (2019); University of Kentucky

A homemade fruit fly trap without apple cider vinegar

White vinegar, wine, beer and ripe fruit all work. Sugar water is the one that barely does.

White vinegar works. A study in the Journal of Chemical Ecology found that acetic acid, the main smell in vinegar, attracts fruit flies as a single compound. White vinegar has plenty of it, and so does malt vinegar from the cupboard.

Cider vinegar should still have the edge, and the reason is the extras. The same study found two other compounds in vinegar, acetoin and 2-phenyl ethanol, made the acetic acid more attractive when they were added to it. Distilling a vinegar strips some of its flavours and smells out, which is why most people can tell white vinegar from cider vinegar by smell alone. So if white vinegar is all you have, use it, add the drop of washing-up liquid, and drop in a piece of very ripe fruit to give it some of what it is missing.

Wine and beer work too. Merritt lists both as a straight swap for vinegar. In the bait study wine caught 13 flies and beer 8, against 23 for cider vinegar, so wine is the better of the two. A dreg of red left in a glass is a ready-made bait.

Ripe banana is the strongest fruit bait in the study, and the University of Kentucky lists a slice of banana as a bait in its own right. Put it in liquid with a drop of washing-up liquid, for the reason in the section above.

Sugar water is the one to skip. It caught 2 flies in eight days. Plain sugar gives off nothing that smells of fermentation, and fermentation is what fruit flies follow.

One thing not to assume: that a stronger smell is always a better lure. A study published in Nature found cider vinegar attracts fruit flies at a relatively low concentration, and that a higher concentration was less attractive to them.

How long to leave a trap, and what it cannot do

A trap catches adults. The eggs are somewhere else, and they keep hatching.

Each female lays about 500 eggs, singly, near the surface of something moist and fermenting, and the eggs hatch in 24 to 30 hours. Egg to adult takes about a week in the University of Kentucky's figure and 8 to 10 days in Maryland's. A trap never touches any of that. It only meets the flies once they can fly.

So run it past one full cycle after the source has gone, a couple of weeks rather than a couple of days. If it is still catching after that, something is still breeding. The fruit fly life cycle explains why one week of trapping is rarely the end of it, and the full guide to getting rid of fruit flies covers the source and the adults together.

And check what you are catching. If the trap stays empty while tiny flies keep rising from a plant pot, they may not be fruit flies at all. Fungus gnats breed in damp compost, and a vinegar trap is the wrong tool for them. If it is ordinary house flies in numbers rather than tiny ones, that is a different source again, covered on flies in the house.

If you would rather compare what a bought trap does differently, the fruit fly trap guide sets the main types side by side.

The same rules, built into one cup

Everything above, made once and reusable: a small exit in the dark, decoy light where they cannot get out, and a pool to drown in. It is for fruit flies at the fruit bowl or the food bin. Flies rising from a plant pot or a drain need their source found, and this will not do that for you.

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.

Eight slots in the lid feed a funnel, and flies drop through a single 4 mm hole that hangs in the middle of the cup, in the shadow of the lid's solid centre. The brightest points a trapped fly can see are eight pinholes at the outer edge of the lid, far too small to get through and well away from the real way out. Underneath is about 25 ml of cider vinegar with a drop of washing-up liquid. When it fills up, you tip it down the sink, rinse it and refill it, and a 500 ml bottle of cider vinegar fills it 20 times.

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 trap builds come from the University of Kentucky, the University of Maryland Extension and Thomas Merritt of Laurentian University. The light point is from the University of Rhode Island factsheet adapted from Ohio State University Extension. The bait numbers are from Salin (2019) in Instars, a Texas A&M student research journal, and the vinegar chemistry from Becher and colleagues in the Journal of Chemical Ecology and Functional Ecology, and Semmelhack and Wang in Nature.

The honest limit is the bait table. It is one trap per bait, outdoors, over eight days, which is enough to show a direction and not enough to promise a number in your kitchen. I have not found a published side-by-side test of white and cider vinegar on fruit flies, so the reason cider vinegar should win is given here and a figure for how much is not.

Common questions

What is the best homemade fruit fly trap?

A jar with a paper cone taped into the top, cider vinegar in the bottom and one drop of washing-up liquid. The cone puts the way out low and in the middle, the tape closes the gaps round the rim, and the washing-up liquid means a fly that lands on the vinegar sinks. Wrap the top of the jar in paper so the exit sits in shadow, because fruit flies head for light.

Does white vinegar work for a fruit fly trap?

Yes. Acetic acid, the main smell in any vinegar, attracts fruit flies on its own, and white vinegar has plenty of it. Cider vinegar should still have the edge: research on vinegar smells found two other compounds in it add to the pull of the acetic acid, and distilling a vinegar strips out some of the flavours and smells cider vinegar keeps. Add a drop of washing-up liquid either way, and a piece of very ripe fruit if you have one.

Can I use normal vinegar instead of apple cider vinegar?

You can. Malt or white vinegar still gives off acetic acid, which attracts fruit flies on its own. If you have no cider vinegar, red wine or a few slices of very ripe banana are the other baits with published results behind them. Sugar water is the one to skip: in a side-by-side test it caught 2 flies in eight days.

What liquid attracts fruit flies the most?

Of the liquids in a published comparison of household baits, cider vinegar caught the most and caught them fastest: 9 flies in the first two days and 23 by day eight. Wine came next with 13, then beer with 8. Rotting banana beat all of them by day eight, but only once it had properly started to rot.

What is the quickest way to get rid of fruit flies?

A trap takes out the adults you can see, and cider vinegar was the fastest bait in the published test, with 9 flies in the first two days. The flies stop for good only when the thing they are breeding in has gone. The University of Kentucky puts it plainly: unless the breeding sites are removed or cleaned, the problem continues however many adults you kill.

How do I get rid of fruit flies if I can't find the source?

Keep a trap going where the flies gather while you look. Check the places a fruit bowl check misses: the recycling, unrinsed bottles and cans, the food bin, and damp mops or cloths, which Maryland says can hold enough food and moisture for them to develop.

How do you get rid of fruit flies in 2 minutes?

You cannot, and nothing homemade will. Each female lays about 500 eggs and the eggs hatch in 24 to 30 hours, so the flies in the air are only the part of the problem that can fly. Two minutes is long enough to bin the fruit they are breeding in and set a trap, which is the fastest real start there is.