Why Do Fruit Flies Like My Worm Bin So Much?

Your worm bin is a smorgasbord of delicious, decomposing food scraps—if you have healthy looking, hardy worms, that’s an indication that your worms are absorbing rich nutrients you’ve been providing from composting material. Those rich nutrients are just as delectable for other insects, as well, and those other insects can be a nuisance.

Fruit flies love worm bins for this reason. They have access to a large source of ample food where they can find nourishment and safe areas to lay eggs.

You probably found this page because you’re having issues with fruit flies in your worm bin. We will help you figure out why the flies are there and how to get rid of the fly infestation for good.

Getting Rid of Your Fruit Fly Infestation

Getting rid of your fruit fly infestation shouldn’t be too difficult. We have a variety of strategies to use in your fight against them below.

Eliminate large clumps of rotting food. When you feed large pieces of food to your worms, the worms generally can’t consume them before nature takes hold and the food starts the process of decomposition. When this food breaks down, it creates chemicals that fruit flies are attracted to. By getting rid of these large chunks, you are removing most of the suitable egg-laying space, which should put a huge dent in the fruit fly population.

Add a thin layer of moist coir or newspaper on top of your feeding area. This will work to keep flies from getting in and laying more eggs, and it will also work to keep existing adults from getting out. Like a surgical mask, air and moisture will still be able to flow between the world and your worms, but the pests will be blocked from entering and exiting. Another way to use this “barrier method” to your advantage is to add cardboard or shredded paper as an additional tray above your food tray.

Make your own fly trap. This can be as simple as setting a little jar containing a mixture of red wine vinegar and dish soap on your counter. Within a day or two, you will start to notice a collection of dead little flies floating on top. If you’d like to try other trap methods, consider making a paper funnel that will invite fruit flies down into the vinegar but make it nearly impossible to fly back out.

Buy a battery operated electric fly trap designed for small flies.

Buy fly tape and string it above your garbage, your worm bin, and any other problem areas. This sticky adhesive tape can be found at stores such as Walgreens, Kmart, Wal Mart, Target, and Lowes.

Place fly-repelling plants near your worm bin—especially carnivorous plants such as Venus Fly Traps. Carnivorous plants are a chemical free, symbiotic way to get rid of flies—eliminate your infestation while simultaneously supplying food to a plant!

Neem Oil does not harm your worms and can be sprayed to control flies. Although it is an organic oil and has no negative effects on your worms, it does have negative effects on the beneficial organisms in your worm bin. Consider using in cases of persistent infestations.

As a last resort, if nothing is getting rid of your fly infestation, consider biocontrol methods such as Bacillus thuringiensis, a bacteria that kills fly larvae. There are also predatory mites and nematodes that eat fly and gnat larvae, such as Steinernemas and Hypoaspis mites.

Preventing Flies in Your Worm Bin in the Future

The key to preventing future fruit fly infestations is to eliminate the odds of stray fly eggs or larvae ending up inside your worm bin.

One of the best ways to do this is by throwing your food scraps in the freezer. Flies lay eggs on the surface of your scraps without you realizing, and freezing compostable food scraps will destroy all fruit fly eggs have already been laid on the food. These eggs would otherwise thrive in your worm bin and potentially begin an infestation.

If you choose to freeze your scraps before you compost them, be sure to let the compostable materials thaw out first before you add them to your worm’s home. Remember, red wriggler worms are drastically affected by temperature change. Adding frozen food scraps to your worm bin could cause their living environment to become too cold for comfort, harming your worms’ ability to eat and reproduce they way nature intended.

You can also microwave compostable materials for at least 60 seconds. Again, make sure the food scraps have settled back to room temperature before adding them to your worm bin. You don’t want to burn your worms! The extreme temperatures could mean death for some of your worm buddies. The worms will squirm away from the heat to cooler, lower layers of their trays. This will also cause them to eat and reproduce less.

If the above two options seem too laborious for you, at least try washing food scraps before throwing them in the worm bin as anything helps when trying to prevent a fruit fly invasion.

A Few Extra Tips on the Fly

Female fruit flies lay hundreds of eggs during their short (~50 day) lifespan. As we learned above, the fragrance released by rotting food attracts the flies and alerts them to a prime breeding spot. Moist, spoiled fruits and vegetables (exactly what you’ll find in a typical worm bin) make it difficult to combat invasions, but there are other useful preventative measures you can take to keep your fly friends away:

Make sure your worms are eating food scraps at a rate that prevents food scrap pile-up. If scraps seem to be piling up, adjust your feeding rate accordingly.

Consider placing a fan close to your worm bin to create an air current that will prevent fruit flies from approaching your worm bin. Keep in mind the temperature and moisture of your worm bin—if you notice the worms knotting up in a ball, the fan is messing up the conditions in your worm bin, making them cold or dry. The fan will also carry the ripe smell away from the worm bin, making it hard for flies to find any faint fragrances they might use to make their way to composting food.

Keep your kitchen sinks and eating areas free of food scraps.

Consider pouring bleach (or whatever cleaning agent you prefer that is appropriate for kitchen use) down your sink drains. When we wash our plates and utensils, we don’t think about the tiny food scraps that collect in kitchen drains. You might even want to run your garbage disposal while pouring in the cleaning agent to ensure it makes contact the entire inner surface of your unit, eradicating any flies/larvae that may be present. Moist areas with tiny food scraps are the perfect area for fruit flies to breed and hide, so adding a cleaning agent to your drains is important to fully eradicate a fruit fly infestation from your home.

No matter what technique you utilize to end the fruit fly infestation in your worm bin, the most important thing to remember is you NEED to proactively engage in prevention, or the fruit flies WILL come back.

Using all of the techniques on this page, you will surely get rid of your infestation for good. Now get up and go apply this new knowledge to your fruit fly problem! Best of luck and happy worm composting!

Discover more about nature’s greatest composters, red wigglers, and make the very most of your green-living hobby. Sign up for our free monthly newsletter to have all our worm composting tips, tricks, and expert advice sent right to your email inbox.

Article by Natalya Cowilich