A worm bin is a living ecosystem designed to decompose your food scraps, and the primary decomposers in there are microbes and the composting earthworms. That said, since there is an abundance of food in there, there is a possibility that your worm farm can invite unwanted guests like fruit flies if the worms and microbes aren't able to get to your food scraps first. Flies are highly undesirable and while they're not harmful to human health, the buggers can be really annoying.
So let's break down some simple ways to prevent a fruit fly outbreak in the first place!
1. Freeze your scraps to prevent eggs from hatching in your worm bin: There are insect eggs on your fruit peels and an easy way to prevent them from hatching inside your worm farm is by freezing your scraps first. Putting your scraps in 650 ml yogurt containers are a great solution if you don't have much freezer space.
2. Monitor the moisture levels in your worm bin: If your worm bin has dry zones with food scraps mixed in, the wormies won't be getting to it because remember that wormies only live in a moisture rich habitat. Your scraps are going to remain undigested and this is going to invite the flies to feast. Spray a bunch of water to fix the dry zones and you'll see the wormies move in to eat the food in a few days. If you're using a plastic system, it's likely going to be too wet which can also attract some kind of flies so in that case you'll need to mix in dry bedding to soak up the extra moisture.
3. Don't leave food exposed on the surface: Make sure to always bury your food scraps beneath a layer of bedding to make it harder for the flies to smell it. Leaving food exposed makes it tempting for flies to come feast, so why won't they? I recommend always maintaining a 1-2 inch layer of bedding on the surface of your worm farm at all times. You can also add a worm blanket on top of the bedding as another barrier. A worm blanket could be a few sheets of newspaper/cardboard, an old towel or bubble wrap.
4. Don't overfeed the wormies: If there's more food in your worm bin than the wormies can handle, it's an invitation for other decomposers like flies to come and help out. It typically takes a week for your food scraps to start decomposing and a month to finish, so if you are still seeing scraps that you added 3 weeks ago, it's a sign that your wormies are unable to keep up so pause feeding for the next one or two weeks.
Ok so these steps should help you prevent an outbreak but life happen and now you've got a fly infestation. If that's you, read on to learn how to fix a fruit fly infestation in a worm bin.
1. Trap flies with a vacuum or a DIY fly trap: First, we need to trap the adult flies so they don't go back into the worm bin or anywhere else to lay eggs. I figured out that a simple fruit fly trap is to take a small mason jar or bowl and a couple of drops of dish soap added to two spoons of vinegar/apple cider vinegar, and a rotting piece of fruit. Cover it with a plastic film and poke tiny holes with a pen to allow flies that are attracted to the sweet smell. Flies can't seem to escape out through the holes somehow!
2. Add 2-3 inch layer of damp bedding on the surface: It's always best practice to have a layer of bedding as a mulch on your worm bin to act as a barrier between the food and the flies. This will restrict movement of files.
3. Skip feeding for a couple of weeks: Give the wormies some time to finish eating whatever food is left in the worm farm. Skip the next feed or two. It will prevent flies from seeking out food.
4. Cover the worm bin if you have an infestation: Ok so sometimes the fly infestation can get really annoying and you just want them to stop immediately. The thing to do here is cover your entire worm farm in a bedsheet to prevent the flies from escaping. In a couple of weeks, the fly population will decline on its own and you will be able to remove the cover.
Flies are a totally preventable part of the composting adventure and the information provided here should help you from major infestations.