We Found a Homemade Fruit Fly Trap That Actually Works

After my first fruit fly sighting of the season, I was determined to get rid of them for good. I turned my kitchen into a lab—testing five versions of the homemade fruit fly trap—and found a clear winner.

We don’t know where the fruit flies came from—they just showed up one night. Maybe some stowaway fruit fly eggs arrived on a bunch of bananas from the grocery store. Or maybe it was a bad idea to let fruit salad sit on the counter while we had a bonfire in the backyard. Or maybe I neglected to empty our compost bucket for a little too long and some of those awful pests with their sense-of-smell superpowers shimmied through a screen.

However they got into our house, we wanted them out. Fast.

Then I noticed a pin on my ever-helpful Pinterest feed: Make a Homemade Fruit Fly Trap, it announced. So I did.

What Causes Fruit Flies, Anyway?

Long story short: fruit flies are attracted to ripened fruits and vegetables, which probably doesn’t come as a surprise. The surprising part, however, is how they travel into your home. Fruit flies are usually brought in by you. Yes, you! These little buggers linger on produce and are brought into your home when you unpack your grocery goodies.

Once they’ve snuck into your home, their breeding process begins (if it hasn’t started already). They breed almost as soon as they land—laying eggs underneath the surface of your precious produce. No matter where they breed, you’ll want to act fast. Female fruit flies can breed up to 500 eggs, which can hatch within a WEEK—eek!

Pro tip: Think throwing away infested produce is enough to get rid of these pests? Think again. Fruit flies can (and will) continue breeding within trash bags, drains and garbage disposals. Be sure to throw away rotten produce before your little friends move in for good.

The Method

My anti-fruit fly campaign became a bit of an obsession. I Googled “homemade fruit fly traps” and felt slightly relieved to discover a long list of folk remedies. I put the five most popular recipes—all of which use common household items—to the test. I’d noticed most of the fruit flies were hanging out near the vinegars in my pantry, so I cleared a spot for the traps on the shelf and let them do their thing for about 12 hours. Here’s how each trap fared.

The DIY Fruit Fly Traps

Trap 1: Rotten Fruit

rotten fruit trap method. bowl of rotten banana slices in a bowl covered with plastic wrap that has had toothpick holes poked into it. wood surface background with bananas and grapes nearby.TMB Studio

Potential benefits: Inexpensive, proven fruit fly attractor, gives rotting fruit a new use

Items Needed

  • Rotten fruit
  • Bowl
  • Plastic wrap
  • Rubber band
  • Toothpick

Directions

  1. Put some chopped, past-prime fruit in a bowl.
  2. Tightly cover the bowl with plastic wrap and secure with a rubber band.
  3. Using a toothpick, poke a few holes in the plastic. The holes should be large enough for fruit flies to crawl in but small enough to keep them from getting out.

Fruit flies captured: 0 (Seriously! I wish I had put up a pantry cam to find out what happened, but I can guess. Read on.)

Trap 2: Milk + Sugar + Dish Soap + Black Pepper

trap 2 mixture in a bowl with the supplies arranged nearby on a wooden surfaceTMB Studio

Potential benefits: Uses common household items, a good way to use up milk that’s close to expiring

Items Needed

  • 1/2 cup milk
  • 2 teaspoons granulated sugar
  • Dish soap
  • Black pepper
  • Bowl

Directions

  1. Combine milk and sugar.
  2. Heat it on the stove or in the microwave, stirring occasionally, until the sugar dissolves.
  3. Stir in a squirt of dish soap (this makes the surface of the liquid somewhat sticky so the fruit flies can’t escape).
  4. Pour the mixture into a bowl.
  5. Crack black pepper over the top.

Fruit flies captured: 3 (This was the most frustrating trap to keep tabs on, because I couldn’t tell the difference between specks of black pepper and potential casualties.)

Trap 3: Balsamic Vinegar + Red Wine Vinegar

trap 3 mixture in a small glass bowl covered with plastic wrap that has holes poked into it. fresh grapes, toothpicks, red wine vinegar bottle, and balsamic vinegar bottle nearby. all on a wooden surfaceTMB Studio

Potential benefits: Quick to set up, easy cleanup

Items Needed

  • Balsamic vinegar
  • Red wine vinegar
  • Bowl
  • Plastic wrap
  • Rubber band
  • Toothpick

Directions

  1. Combine equal parts balsamic and red wine vinegar in a small bowl.
  2. Cover tightly with plastic wrap.
  3. Secure with a rubber band.
  4. Poke a few holes in the plastic (as with Trap No. 1).

Fruit flies captured: 0 (Fruit flies sure do like the vinegar bottles in my pantry, especially the balsamic. But for some reason, they weren’t attracted when it was served up in a glass.)

Trap 4: Dish Soap + Apple Cider Vinegar + Hot Water

sudsy trap 4 mixture in a glass with dawn dish soap, apple cider vinegar bottle, and fresh fruit nearby on a wooden surface.TMB Studio

Potential benefits: Quick to set up, uses common household items, easy cleanup

Items Needed

  • Dish soap
  • Apple cider vinegar
  • Glass
  • Water

Directions

  1. Squirt a little dish soap into a glass.
  2. Add apple cider vinegar until the glass is one-third full.
  3. Let your tap run until the water is steaming hot, then blast it into the glass so a thick layer of bubbles forms on top.

Fruit flies captured: 18 (The fruit flies that had been hovering around the rotten fruit trap buzzed right over. The bubbles dissipated quicker than I would have liked, so I had to keep adding more water to refresh the bubble layer.)

Trap 5: Beer + Rotten Banana

trap 5 set up in a glass jar with toothpicks, bottle of beer, and fresh fruit nearby on wooden surfaceTMB Studio

Potential benefits: Gives rotting fruit a new use, a valid excuse to dump a beer you’re not a fan of

Items Needed

  • Rotten banana
  • Jar
  • Beer
  • Cone-shaped coffee filter
  • Toothpick

Directions

  1. Put a piece of rotten banana in a jar.
  2. Pour in enough beer to partially cover the banana.
  3. Grab a coffee filter and poke a small hole in the bottom.
  4. Set it on top of the jar, folding the paper over the edges of the jar to hold it in place.

Fruit flies captured: 3 dead, 5 alive (This turned out to be a sad waste of beer.)

The Results

Trap No. 4 won by a landslide! I was inordinately happy (gleeful, really) to see the death toll mounting each time I checked this trap during the day.

I think Trap No. 5 has potential. If you’re curious about this method, add a squirt of dish soap to the beer and use the plastic wrap cover method from Trap No. 1. Maybe you’ll have more luck.

The Takeaways

Since that first test, I think I’ve perfected the winning trap. I first used a juice glass, which meant I had to refresh the bubbles a few times. Later, I tried it in a pint glass. Sure, it uses more vinegar, but the bubbles last much longer, making fruit fly elimination a hands-off event.

I also tried this trap with two types of apple cider vinegar: the clear filtered stuff and the raw, unfiltered variety. The latter was definitely more effective, probably because it contains little bits of fermented apple.

How Can I Prevent Fruit Flies?

The easiest way to avoid a fruit fly catastrophe? Use up those ripe fruits and veggies! (Here are some great ideas for using up ripe bananas.) If you want to save your ripened produce for a few days longer, store them in the refrigerator to prevent any uninvited guests from breeding. Then when discarding inedible, overripe produce, throw away the trash ASAP.

Up Next: Get rid of other pantry pests

Ellie Martin Cliffe
Ellie has spent almost 20 years writing and editing food and lifestyle content for several well-known publishers. As Taste of Home's content director, she leads the team of editors sharing tasty recipes, cooking tips and entertaining ideas. Since joining Taste of Home 13 years ago, she has held roles in digital and print, editing cookbooks, curating special interest publications, running magazines, starring in cooking and cleaning videos, working with the Community Cooks and even handing out cookies and cocoa at local holiday events. Gluten- and dairy-free since 2017, she’s a staff go-to on allergy-friendly foods that actually taste good. If she's not in her plant-filled office, find Ellie in her family’s urban veggie garden, in the kitchen trying new GF/DF recipes or at a local hockey rink, cheering on her spouse or third grader.
Christina Herbst
Christina is a Social Media Editor for Taste of Home. She enjoys trying out local restaurants and coffeehouses and adding copious amounts of garlic and cheese to any recipe she can get her hands on. In her free time, you can find her hunting down one-of-a-kind furniture pieces at thrift and vintage stores and DIYing trendy home decor crafts.