Summer produce at its finest means fruit flies are also at their finest. And by finest, I mean wining, dining, and breeding all over your countertop. The good news: Getting rid of fruit flies doesn’t require an exterminator—or much more than a jar, a piece of paper, and some past-its-prime fruit.
The fastest way to get rid of fruit flies is to attack the problem from both sides: Remove their food source, then trap the flies that remain. After experimenting with different fruits, vinegars, containers, and funnel sizes, I’ve determined the best homemade fruit fly trap is a simple paper funnel tucked into a jar with overripe strawberries, cut stone fruit, or banana peels, plus a splash of fruity vinegar. Here’s how I got there:
Why do fruit flies suddenly appear?
Fruit flies don’t appear out of nowhere. The pesky little bugs typically hitch a ride to your house on fresh produce purchased at the grocery store or farmers market, then multiply quickly once they find an attractive food source.
Washing produce thoroughly can help get rid of adult flies, but there’s no easy way to tell if they’ve already laid eggs in your food (yes, in…). If they find an adequate food source in your kitchen, they’re more than happy to set up camp. They’re especially drawn to overripe fruit, vegetables, compost, recycling bins and trash cans, garbage disposals, and anything that’s starting to ferment. Fruit fly larvae typically hatch within a day or two and spend the next week chowing down. Within a week or so, they’ll be full-grown adult fruit flies who will then lay their own eggs. This rapid life cycle is why getting rid of fruit flies can be so tricky.
Read more: 10 Tips for Keeping Produce Fresh Until Your Next Grocery Run
But wait: Are they actually fruit flies?
There’s a chance the gnats you see flying around aren’t fruit flies at all. Fruit flies are small brown bugs with red eyes, but they’re easy to confuse with fungus gnats and drain flies.
Fungus gnats are black and are more commonly found milling around the soil of houseplants. Drain flies have larger V-shaped wings—they almost look like tiny moths—and are usually found hovering around sink drains (surprise!) or garbage disposals. You’ll need to clean their respective hangouts to prevent egg-laying, but the same traps often work on these pests.
How to get rid of fruit flies
Start by deep cleaning your kitchen: Remove any ripe or rotten food where the flies may have laid eggs. That means throwing away anything sitting on your kitchen counter. It might seem like a waste, but fruit fly larvae tunnel into produce to feed—so, you know…do you really want to eat that apple? Until you’ve successfully vanquished the bugs, thoroughly wash any new produce you bring home and store it in the fridge.
Fruit flies may also use your trash can and compost bin as a breeding ground, especially when there’s rotting food inside. To that end, take the garbage out more frequently and clean your trash can. You’ll also want to flush your garbage disposal: Grind a handful of ice cubes to dislodge any stuck-on food, then rinse with hot water. Regularly wipe down counters to ensure the flies don’t find any food or remnants of sticky spills. Generally, keep your kitchen as clean as possible for at least a week to prevent female fruit flies from laying more eggs.
The best homemade fruit fly trap we tested
I started out by plugging in a fresh-from-Amazon light-up trap, which did little to quell the growing army of bugs. Then I landed on DIY. The soap and vinegar bowl? Didn’t work at all.

