Get Rid of Fruit Flies With a Homemade Fruit Fly Trap

Illustration of how to make a fruit fly trap

 The Spruce / Melissa Ling

Battling a swarm of fruit flies in your kitchen or bathroom? How annoying! We know it feels like a war you can't win but we promise that you can, actually, get control of fruit flies more easily than you think. In just minutes you can quickly rid your home of fruit flies by making this simple, homemade trap from ingredients you already have in your cupboard.


  • Apple cider vinegar
  • Dish soap
  • A jar or small bowl
ingredients for a fruit fly trap
The Spruce / Ana Cadena 


Although vinegar is the main ingredient, and it is considered safe for consumption, liquid dish soap is not. Keep this solution out of the reach of children.


Click Play to Learn How to Get Rid of Fruit Flies



Before you begin, toss out any overripe fruit that may be attracting fruit flies.

  1. Pour around a cup of apple cider vinegar into a jar or small bowl. (It doesn't have to be exact.)

    pouring vinegar into a jar
    The Spruce / Ana Cadena  
  2. Add a couple of drops of dish soap to the jar. (Do not mix.)

    squeezing a few drops of soap into a jar
    The Spruce / Ana Cadena  
  3. Place the trap in the area where you've seen the fruit flies, and wait for it to do its job. Soon, the container will be filled with drowned fruit flies. Rinse and repeat.

    fruit fly trap on a kitchen counter
    The Spruce / Ana Cadena 

Why This Works

Vinegar is a natural, versatile, environmentally-friendly kitchen product. In addition to its cooking uses, it is an inexpensive ingredient in many cleaning DIYs. Plus, unlike many commercial products, vinegar does not emit harmful, harsh fumes. It really just makes things smell like a salad!

Fruit flies are attracted to the smell of the cider vinegar and will attempt to land on its surface. However, they're in for a big surprise—since the dish soap breaks the surface tension of the vinegar, the fruit flies fall in and drown. Say goodbye to that annoying swarm.


  • A bottle with a small neck can also be used.
  • Keep a fruit fly trap on your kitchen counter, even after you've trapped your fruit flies: This trap will prevent future infestations from occurring. You can keep it in a pretty container so it doesn't stand out. The vinegar evaporates over time, so top it off whenever you notice it's getting low.

Alternative Method

If you don't have any vinegar on hand, you can also trap fruit flies by placing a piece of overripe fruit in an open plastic bag. Wait for the fruit flies to congregate on the fruit, then carefully seal the bag, trapping them inside.

How to Prevent Future Infestations

If you'd like to try more than making a trap, here are some good solutions:

  • Often infestations occur when you bring home infected fruit from the grocery store or produce stand. If you notice fruit flies when you're shopping, skip any produce that they're near. You can bet there are plenty of fruit fly eggs on that produce just waiting to hatch in your kitchen. When you consider that a single fruit fly can lay 500 eggs, that's a pretty compelling reason to go home without the bananas that you planned to buy.
  • When you do buy fruit, rinse off those that are washable once you get home: apples, stone fruit, bananas, citrus fruits, etc., to dislodge fruit fly larvae. Plain water works, but you can also use one of those fruit and vegetable washes found in the produce department of your supermarket.
  • Be diligent about eating fruits and vegetables before they become overripe or go bad. Fruit flies like to lay their eggs on ripe or fermented produce. Even better, store them in the refrigerator.
  • Wash down your kitchen: Those fruit flies also land and lay eggs on your countertops—even in your sink. In fact, be sure there is no food waste leftover in your drain or garbage disposal.
  • Take your trash out regularly. Recyclables, too: Small amounts of juice or wine left at the bottom of bottles are enough to catch the attention of a fruit fly. If you can't remember the last time you scrubbed out your kitchen trash can and recycling bins—now might be the time.
  • Be sure to periodically throw your reusable shopping bags into the washer as well before the fruit flies remind you that you're overdue.

Watch Now: DIY Citrus and Herb Sprays for a Cleaner Green Home

Article Sources
The Spruce uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Potter, Michael F. Fruit Flies. University of Kentucky College of Agriculture Cooperative Extension Service.