Get Rid of Fruit Flies With a Homemade Fruit Fly Trap

Illustration of how to make a fruit fly trap

 The Spruce / Melissa Ling

Fruit flies can be a menace in the home, getting into food and multiplying quickly. But getting rid of fruit flies is easier than you might think with this simple homemade trap. It only takes minutes to put together, and you might already have the necessary ingredients in your cupboard. Here's how to make this basic yet effective fruit fly trap.


  • 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 might be attracting fruit flies.

  1. Measure Vinegar

    Pour around 1 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 Dish Soap

    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. Set Out Trap

    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. Repeat with a fresh trap as necessary.

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

Why This Works

As a natural, versatile, and environmentally friendly kitchen product, vinegar has many uses for cleaning. 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.

Fruit flies are attracted to the smell of the cider vinegar and will attempt to land on its surface. However, they will pass through the dish soap on the surface, not be able to get back up through it, and drown.


  • 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, and 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.
  • Rinse off fruits 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.
  • Keep your kitchen clean. Fruit flies land and lay eggs on countertops and 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.
  • Periodically throw your reusable shopping bags into the washer before 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. Fruit Flies. University of Kentucky College of Agriculture Cooperative Extension Service.