Getty Images/Drbouz

How to Get Rid of Fruit Flies in 5 Ways That Actually Work

Fruit flies can be the bane of every kitchen, no matter what time of year it is. A fruit fly infestation can quickly spiral out of control if steps aren't taken at the first sign of a fruit fly problem. Fruit flies are small, numerous and more annoying than most other insects as they swarm around produce and feast on the sugars in rotting and fermenting fruit (check your garbage disposals regularly, y'all). They're also so pesky, it's no wonder everyone wants to know how to get rid of fruit flies.

For such a short life cycle, adult flies can wreak some serious havoc in your kitchen. With a 30-day lifespan and a staggering breeding rate - females can lay 400 eggs in a week's time - adult fruit flies seem to come from nowhere and multiply right before your eyes. They're attracted to damp areas with anything they can eat (rotten fruit, in particular, is their favorite food source), making them regular pests in compost piles, garbage cans, the kitchen sink, grocery stores, markets and restaurants.

These buggers are even a nuisance to wineries and breweries - the fly can find fermenting fruit juice or wine from a half-mile away, and carry loads of bacteria that can ruin a glass - or a whole cask - of wine or beer. Unforgivable.

But while these gnats might seem inevitable, there are things you can do for pest control. Simple homemade traps can help you keep fruit flies under control and off your kitchen counter, plus there are a few tricks you can use to keep them from coming back.

So how to get rid of fruit flies? We've got five DIY ways how to kill fruit flies to keep your home pest-free without using hazardous or expensive chemicals.

1. Vinegar fruit flies trap

The vinegar trap is a tried-and-true homemade fruit fly trap classic. Fruit flies are attracted to the scent of apple cider vinegar - earning them the common nickname 'vinegar flies' - and can't resist flying into a container with the stuff. Once they're in, they can't get out.

You'll need a mason jar, 1/2 cup of apple cider vinegar, dish soap, a funnel and optionally, a piece of overripe fruit. Basically, you're creating the perfect fruit fly breeding ground.

Heat up the apple cider vinegar in a small saucepan to release the scent - fruit flies find it irresistible - and pour it into your container, adding a few drops of dish soap along with it to break surface tension and keep them from feasting and flying off.

You can also add a piece of overripe fruit to make it more attractive to flies. Place a funnel in the top of the jar - a rolled-up piece of paper is fine - which allows flies in, but not out. It's an easy, no-mess way how to kill fruit flies.

2. Fruit trap

Fruit flies are attracted to - you guessed it - fruit. Why not tempt them with their favorite?

You'll need a mason jar, overripe fruit, plastic wrap and a toothpick.

The fruit trap works on the same principle as the vinegar trap. Place a piece of overripe fruit in the bottom of your container. Next, securely cover the opening with a sheet of plastic wrap (or your paper funnel). With your toothpick, poke a few small holes in the plastic.

The flies will be able to get in - but they won't make it back out. (Yes, we're trying to refrain from making a Hotel California joke here.)

3. Red wine trap

delivery of bottles of wine in box

Getty Images/oliver de la haye

Fruit flies like wine almost as much as you do. Why not use that to your advantage and keep them away from your wine for good? The red wine trap is an easy way to kill fruit flies, if you're willing to sacrifice some of the good stuff.

You'll need a mostly empty wine (or beer) bottle. After you've enjoyed said bottle of wine, leave the last little bit in the bottle - I know, it's not easy - and leave the cork out of the neck of the bottle.

Place near the source of the flies and wait a few days. You can also transfer the wine to another container, and cover with punctured plastic wrap. They may have died, but at least they died drunk. Luckily for the beer-lovers among us, a leftover bottle of brew works as well.

4. Milk and sugar trap

There's an interesting way to kill fruit flies detailed in an 1850s Old Farmers Almanac. You'll need two cups of milk, a half cup of white sugar, and 2 ounces of ground black pepper. Combine the milk, sugar and pepper in a saucepan and simmer for 10 minutes, letting the sugar dissolve. Once the mixture has cooked, turn the heat off and let it cool. Pour the mixture into shallow bowls and place them in problem areas around the house.

The flies will be attracted to the sugar and will drown, solving your fruit fly problem.

5. Keeping fruit flies gone

Delicious fruit salad on a plate on table.

Getty Images/Vitalina

Don't forget, these traps to kill fruit flies may take care of the adult population, but there still may be larvae lurking. To keep fruit flies from coming back,  you have to kill the eggs, too. Make sure your kitchen and home are free of standing water, mop buckets, leaking pipes or any place that would make a good home for fruit fly larvae. If a stinky sink seems to be the source, dilute a cap-full of bleach with 12 ounces of hot water and pour it down your kitchen sink drain.

Given the fruit flies' love for rotting food, make sure trash cans are closed and trash bags are tied up tight. Fruit flies also love dirty dishes, so now is the time to tackle that pile in the sink.

If you have houseplants, poor quality soil could also be a problem. Many cheap potting soils contain fungi and decaying organic matter that attract fruit flies. Switch to better soil, and top your potting mix with a layer of aquarium gravel or coarse sand to keep hatched larvae from crawling out.

Even if the fruit you buy at the grocery store is perfectly fresh, it may have fruit fly larvae on it after coming into contact with rotting fruit, so one thing you can do is wash any fruit when you bring it home to kill the eggs of the fruit flies. For fruit like bananas and melons, add a half cup of vinegar to a large bowl of water and submerge the fruit to wash it off.

If you're planning on letting fruit ripen on the counter (it's the only way to get really great banana bread), make sure the fruit is clean first and have your fruit fly traps ready to go.

How to Prevent Fruit Flies

As useful as it is to know how to trap fruit flies, it's even better to prevent them from infesting your kitchen in the first place. To prevent fruit flies, you need to be more intentional with your storage. One tip is to keep fruits and veggies in the refrigerator to slow down how quickly they ripen. If you do store anything on the countertop, make sure to wash the fruits and veggies well and keep them covered.

Another part of the kitchen that attracts fruit flies is the trash. Empty trash cans frequently, especially if they have food in them. Along with this, keep your garbage disposal and sinks clean, always cleaning out the drain stopper if it has food debris in it.