Skip to Content

Have Fruit Flies in Your Compost? This Is What to Do

Have Fruit Flies in Your Compost? This Is What to Do

Share this post:

This post may contain affiliate links. If you click one of these links and make a purchase, I may earn a commission at no additional cost to you. In addition, as an Amazon Associate I earn from qualifying purchases.

As I write this, my wife and I are currently dealing with a minor fruit fly problem in our kitchen. We only have a few of them and know what to do to get rid of them, but it’s still a nuisance.

Unfortunately, your kitchen isn’t the only place that you may encounter fruit flies. Your compost pile is another prime spot, and it’s not much of a surprise, considering you constantly fuel it with fermenting foods, which fruit flies love.

If you’re in this situation right now, I’m sure you want to find a solution as quickly as possible. What you don’t want to do though is compromise your compost pile in order to get rid of the fruit flies.

In this article, I’ll go over ways to safely get rid of fruit flies in your compost (or at least reduce the population significantly). Before we dig in, let’s first determine whether or not you should be concerned about having fruit flies in your compost in the first place.

Are Fruit Flies Harmful to Your Compost Pile?

While you definitely don’t want fruit flies in your house, is a population of fruit flies actually a bad thing for your compost? While fruit flies are generally considered to be harmless, they may lead to problems elsewhere.

Since they like to lay their eggs in the skin of soft fruits and vegetables, having too many of them in your compost could lead to problems in your garden.

Along the same lines, if a population of fruit flies gets large enough, as they run out of food, they will look for the next available source. That food source may be inside your home, where you definitely don’t want them around.

Fruit flies multiply fast, so it’s important to get them under control right away when you realize you have a problem. That’s what we’ll take a look at next.

How to Get Rid of Fruit Flies in Your Compost

Prevention is always better than fixing a problem after it’s already happened, but sometimes we don’t realize there are potential issues until it’s too late. That is often the case with fruit flies, as they seem to pop up from out of nowhere and multiply like crazy.

Fruit flies are attracted to the alcohol produced by fermenting foods like fruit (go figure), and they like to lay their eggs in moist areas. As you can imagine, a compost pile has a lot of ideal components to attract them.

As soon as you realize you have a fruit fly problem, it’s time to take action. To keep the fruit fly population down, you have two options: one, make the environment less appealing, or two, create a more appealing alternative for them. I’ll go over each of these options next.

1 – Alter The Environment

To make your compost pile less appealing, you need to cut down on the available food source and cut down on the moisture. Both of these things can be accomplished by adding more carbon-rich brown matter to the top of your compost. Brown materials include things like leaves, plants, and paper.

These carbon-rich materials will help to balance out your green materials (like food waste), giving your fruit flies less to munch on. For the food waste that you do add, make sure to bury it deep enough so it’s not on the surface.

To take it step further to make sure you aren’t adding any fruit fly eggs to your compost pile, freeze your food scraps before bringing them outside.

2 – Attract Them to Something Else

The second way to get rid of fruit flies in your compost pile is to give them something more attractive to go after. The best way to do this is to set a trap. Traps can be homemade or store bought.

To make a homemade trap, put a few drops of dish soap in a container of apple cider vinegar, then cover the container with plastic wrap with some holes punched into it. The fruit flies will crawl through the tiny holes to get to the apple cider vinegar, then get stuck there in the liquid.

Alternatively, you can buy a fruit fly trap online. These traps work in a similar fashion to the homemade method, except they are coated with a sticky substance (rather than a bowl of liquid). This is a quick an easy alternative to making your own trap. Either method can work well.

Don’t Use Boiling Water

While you might be tempted to simply pour boiling water on your compost pile, I would avoid doing so. While the boiling water may kill off any fruit fly eggs in your compost, it will also likely kill off the beneficial bugs as well, which are needed for your compost to work as intended.

Final Thoughts

Although fruit flies are more of a nuisance than anything, there are still valid reasons to keep their population at a minimum in your compost pile. Prevention is always ideal, but if it’s too late, try one of the tips above to take back control of your compost.

Share this post:


Sunday 29th of November 2020

NEWS UPDATE: Fruit Flies can be Dangerous!

The spotted-wing Drosophila Suzuki (SWD) is a big problem. They cause severe damage to fruit crops and are a serious threat to agriculture throughout North America including Canada, Central America and Europe.

They have red eyes and the males can be easily identifies by a single black spot on the tip of wings. It has arrived from Asia in the last decade and is very serious. It threatens ALL our fruit crops. Very serious.

Jeff - Could you update your post ASAP please? We need everyone’s help to fight this menace.

Best to put fruit fly traps out year-round and check/refill them on a weekly basis. If you have blueberries, strawberries, raspberries, grapes, currents, etc the only way to stop them from laying eggs and getting maggots and population explosion and spread is to wrap the entire plant in very fine bug netting specifically less than 1mm hole size.

Trust me, prevention is the best option. Even if they haven’t reached your area yet, start with traps (apple vinegar with a drop of dish soap in container with very small holes that they have trouble getting out.

Good luck and thanks for your action. Spread the word!

Claudette from pacific Canada Master Gardener