They can be incredibly annoying, but there’s another reason to try to keep them at bay: they can do damage to your garden crops! When it comes to figuring out how to get rid of fruit flies, these ideas will help reduce their population. Plus, learn how to make an easy DIY fruit fly trap.
With various fruit ripening here year round, fruit flies are an ongoing problem for us; food sources for them are plentiful. While I have yet to figure out how to eliminate them entirely, we’ve discovered some eradication tactics that work.
This post may contain affiliate links; I'll earn a small commission if you choose to make a purchase.
If you live near an orchard, vineyard, or farm, you might notice that the fruit fly population ramps up at harvest time.
Reader Favorites from Attainable Sustainable
Where do fruit flies come from?
While it may seem like they appear out of nowhere, these tiny flies breed, lay eggs, hatch into larvae, and emerge as adults. It’s a process that you probably don’t notice until the fruit flies become obvious. That life cycle can be completed in less than a week, and an adult produces about 500 fruit fly eggs in its lifetime.
These pests are drawn to rotting, fermenting fruit. But that’s not the only place they’ll complete their life cycle. Fruit flies can develop in very small amounts of moisture, often hidden away where you won’t notice them.
How to get rid of fruit flies: 10 ways to clear them out
Better kitchen compost
Probably the most common culprit of fruit fly infestations in the home, the kitchen compost is their haven. It might attract fruit flies to deposit eggs there, but it’s possible that the eggs were already on the fruit you just peeled. (I know, gross.) These buggers ‘sting’ ripe fruit and the eggs hatch inside, causing the fruit to rot. (They do a lot of damage here to soft-skinned fruit like tomatoes.)
A kitchen compost container with a secure lid will prevent fruit flies from entering the container to lay eggs. It will also prevent newly hatched fruit flies from emerging. The trick with keeping your compost free of flies is to empty it daily and wash it after you do. Being mindful of our kitchen compost has made a big difference in our efforts to get rid of fruit flies.
Move your outdoor compost
Fruit flies can be a nuisance in compost piles as well as in the kitchen. To prevent an outdoor infestation from becoming an indoor infestation, keep your compost pile some distance from the house. [Read more about eliminating fruit flies in compost piles here.]
There’s no easy way to know if the produce you picked up at the farmers market is already infested with small fly eggs, but refrigerating fruits and vegetables will prevent larvae from hatching and dispersing. Instead, the flies will hatch and die inside the refrigerator, disrupting the life cycle. (And yes, causing a mess in the fridge as you can see, but they’re much easier to clean up when they’re not flying.)
Cover your produce
Some ripened fruits and veggies are best stored at room temperature. Covering your fruit bowl until you use them will prevent adult flies from depositing eggs on them. Cracked areas on fruits and veggies are particularly susceptible.
Eliminate fruit fly breeding grounds
While the kitchen compost is a common source of fruit fly infestations, these tiny flies can breed in other damp areas, too. Wet cleaning rags, mops, and drains can be a problem, too. Pouring bleach or more natural citrus cleaner down drains during an infestation can help get rid of fruit flies.
Check your screens
Adult fruit flies will enter your home in search of overripe fruit if given the chance. Even just a small hole or tear in your screen can be an access point.
It may sound silly, but during harvest season fruit flies can become really thick. A friend of mine discovered years ago that sucking fruit flies right out of the air with a vacuum attachment is a pretty easy way to get rid of fruit flies. And again, once you’ve eliminated the adult flies, be sure to remove the breeding grounds.
Make a DIY fruit fly trap
Making a DIY fruit fly trap is easy, and there are several ways to go about it. Take note of what the fruit flies in your neighborhood are attracted to. Some people swear by vinegar, but I’ve not had any luck with that here. With a trap, the trick is to get them into a place that they cannot get out of. (I guess the refrigerator might qualify as a DIY fruit fly trap, too, now that I think about it!)
Natural pest control allows us to keep the bugs in check without exposure to harsh chemicals. I’m all for that!
Enjoy a glass of wine
Wine drinkers, you know what I’m talking about. Wine is like a fruit fly magnet. Pour a glass and set it down and the fruit flies will move in before your next sip. You can replicate this by simply pouring about half an inch of wine in the bottom of a glass to make a DIY fruit trap that seems like a party.
Fruit flies can land on liquid without drowning, though. Adding a few drops of dish soap will break the surface tension causing them to sink when they hit the liquid.
Tuck a banana peel or two in a recycled plastic bag or a crumpled paper bag. Maneuver the bag opening so that the opening is pulled into a “neck” that’s not completely sealed. The fruit flies will be drawn to the banana and enter the bag. Monitor the bag and when you see a lot of flies entering, quickly grab the bag at the neck and close off their escape.
If you used a paper bag, you can drop the bag right into your outdoor compost pile. If you used a plastic bag, tie off the neck and dispose of it in the outside rubbish can.
Bananas are quite fragrant and a good attractant, but other overripe fresh fruit will work as well.
Vinegar and soap DIY fruit fly trap
Put about an inch of vinegar in a glass and add a few drops of liquid dish soap. Form a paper cone, leaving a small opening at the tip. Set the cone in the glass pointed end down and set near the infestation. Be sure to remove any other attractants that might divert them from this DIY fruit fly trap, such as rotting fruit or compost.
Note that if vinegar doesn’t seem to be the right attractant, you can try fruit juice or soy sauce, too, to attract and get rid of fruit flies. I’ve had better luck with both of those than I have with vinegar, sometimes.
Sticky DIY fruit fly trap
Punch a hole in a piece of recycled card stock (postcard size works well) and add a string or ribbon hanger. Spread the card stock with a thin layer of Tanglefoot, covering card completely. Allow to dry, then hang near fruit fly infestation.