Battling a swarm of fruit flies in your kitchen or bathroom? Get rid of them quickly with this simple, homemade trap.

What You Need:

Apple cider vinegar

Dish soap

A jar or small bowl

The Spruce / Ana Cadena

Warning 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.

What You Do:

Toss out any overripe fruit. Then, pour a cup of apple cider vinegar into a jar or small bowl. The Spruce / Ana Cadena Add a couple of drops of dish soap to the jar. The Spruce / Ana Cadena Place the trap in the area where you've seen the fruit flies, and wait for it to do its job. The Spruce / Ana Cadena

Why This Works:

Fruit flies are attracted to the smell of the vinegar and will attempt to land on its surface. However, they're in for a 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!

Benefits of Using Vinegar:

No harsh fumes

Inexpensive

Environmentally-friendly

Tips

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. It'll 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.

Another Way to Trap

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. Just wait for the fruit flies to congregate on the fruit. Then, carefully seal the bag, trapping them inside. Easy!

How to Prevent Future Infestations

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 out in your kitchen. And 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.

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.

And be sure to take your trash and recyclables out regularly. 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, go ahead and take care of that before the fruit flies remind you that you're overdue.