Fungus Gnats in Worm Compost Bins

Like fruit flies (a topic I’ll be revisiting before too long), fungus gnats can represent a seriously annoying pest for home worm composters! Some recent email exchanges with a couple of our readers has inspired me to write about the topic.

Fungus Gnat

Fungus gnats (eg. Bradysia sp., Sciara sp.) are small, winged insects that are often found in association with the moist, rich soils of household or greenhouse plants. The adults lay their eggs in these substrates and the resulting larva feed on organic matter and the fine roots of young plants (if available). As such, the larva can be serious greenhouse pests, especially when seedlings are being grown. Aside from the damage due to direct consumption of roots, these pests can also transport various root diseases (such as those causing ‘damping off’).

In appearance, fungus gnats look somewhat similar to fruit flies in that they are about the same size, and are also small flying insects (duh!). With a little experience however, you will come to realize that these two pests can easily be distinguished from one another. Fruit flies tend to be lighter in colour (sandy brown or grayish) with red/orange eyes, whereas fungus gnats are typically much darker, and seem have have a more delicate appearance (best way I can think of to describe it – hehe).

The worm bin represents the ultimate fungus gnat haven, given the abundance of organic matter and moist conditions. Generally speaking – and unlike fruit flies – fungus gnats tend to be more of an issue once a worm bin is starting to reach ‘maturity’ (ie. when much of the bedding has been converted to worm castings). In fact, a gnat infestation may be an indication that it’s time to harvest castings and/or start-up a new bin (splitting the contents of the first one).

Methods for Controlling Fungus Gnats

As with fruit fly infestations, the best strategy against gnats is definitely prevention! Once these insects get established it will be much more difficult to get rid of them. That being said, there is no doubt that many of us will have to deal with them once they have already invaded, so let’s chat about some of the various ways you can deal with a population of them in your worm bins.

Vacuum – Ok, stop your giggling – I’m serious! Using a vacuum cleaner to suck up adult fungus gnats (and fruit flies) can in fact be an effective way to help slow a population explosion. Of course, there will still likely be many many larvae already happily feasting away in your worm bin, so you’ll likely need to continue your vacuum efforts on a daily basis for at least a little while.

Sticky Traps – As shown in the video above, having some sort of sticky trap(s) as part of your gnat fighting arsenal definitely makes sense. Situating these traps in and around your worm bin should help nab quite a few adults.

Coffee Grounds? – One of our readers, Christy, sent me an email inquiring about fungus gnats (specifically, she was wondering how best to deal with them) and mentioned that she might try out a technique suggested by someone else – suppressing them with coffee grounds! I had never heard of this, but encouraged her to give it the ‘ol’ college try’ anyway to see what happens. Well as Christy informed me a short time later, it actually worked quite well! I’ve read that caffeine can be deadly for some organisms (slugs seem to come to mind, but not sure), so perhaps this is the mechanism at work. Aside from wanting to try this out myself in my next gnat-infested worm bin, I think I might want to try leftover coffee as an insect spray in the garden next season to see if it has any effect.

Physical Obstruction – This could be considered closely tied in with the idea of ‘prevention’, since various suppression techniques can offer you a good way to prevent a fungus gnat invasion in the first place. Keeping a thick layer of bedding over top of your composting materials may help to impede emerging adults, as well as those looking for a good place to lay eggs. In one of the videos below (the eHow video), she talks about using a layer of sand over top of your potting soil in house plants. While this might not be the most practical solution for worm bins, it is important to consider where your fungus gnats might have come from in the first place. If you do have houseplants, and like to grow stuff indoors in general, be sure to inspect your growing areas on a regular basis, and try out some of the techniques outlined in the eHow video.

Carnivorous Plants – This is probably more of a novelty method than anything, but you never know – with a few well-placed phytocarnivores in your house you may be able to put a dent in your gnat population (although I suspect this technique will work much better for fruit flies, since they are more likely to get lured by the sweet nectars used as attractant). I would think that Sundews might be the best of the bunch since they are easy to grow and offer multiple ‘sticky traps’ in the form of tentacle laden leaves, but you may have some fun with Pitcher Plants or Venus Flytraps as well. Check out the video below and see how a fungus gnat gets ‘owned’ by a Pitcher Plant.

Biological Control Organisms – There are various biocontrol organisms you can buy to help deal with your fungus gnat infestation. The bacteria, Bacillus thuringiensis (Bt) – used as a biocontrol agent for many insect pests – can be applied as a soil/compost drench to help kill off gnat larvae. ‘Gnatrol’ is an example of a Bt product you can buy for this purpose.

There are predatory mites used the help control the populations of various insect pests. Likely the most widely known is Hypoaspis miles. I actually tried these mites out myself when trying to deal with an insane gnat infestation in a couple of my bins a number of years ago. To be honest, I was a little disappointed with the results. I think my vacuuming had more impact than the mites did.

There are also predatory nematodes (eg. Steinernema sp.) that can be used to fight soft-bodied insect larvae (such as fungus gnat larvae). I’ve never tried them myself, but have read that they can be effective – potentially even more so when combined with other biocontrol agents, such as those mentioned above.

Ok, I think that’s enough reading (on your part) for one post! 😉
As mentioned, I’ve included (below) a couple interesting YouTube videos relating to fungus gnats. Be sure to check them out.

Fungus gnat gets ‘owned’ by predatory plant

Interesting video from eHow – more geared towards getting rid of gnats in houseplants, but still valuable information for vermicomposters since the source of gnats can often be household potted plants.

She mentions some odd solutions (such as cider vinegar) that sound more in line with fruit fly strategies, but she also offers some interesting strategies I’ve not heard of.

**Want Even More Fun With Worms? Sign Up for the RWC E-mail List Today!**
Previous Post

The Power of Worms is MINE!

Next Post

Natura Cloths – Not Just For Cleaning Anymore!


  1. Pingback: The Worms Have Been Pardoned…..for Now | Organic Needle

    • Adam
    • May 4, 2009

    I started some small experimental worm bins of my own. No pseudoscorpions yet, but plenty of fungus gnats. So I programmed a simulation of the gnat’s life cycle, and tried various scenarios of control.

    In an optimal environment, IE a worm bin with moist organic material near the surface and no predators, the gnat population exploded. Slowed down my computer to a crawl after just a few simulated weeks.

    The problem wasn’t the flies themselves, but the larva, eggs, and pupa. I did a scenario where a percentage of adults were killed every day. Even at 80%, the population would grow, since most of them were in the non-adult stages, and they usually had time to lay eggs before they were killed. It could go for several days or even a week or 2 without any adults, then BOOM, adult population explosion!

    They really are rather fascinating bugs. Apparently, they are composters. Wouldn’t it be interesting to make a fungus gnat bin?

    In one of my real worm bins, they usually stay in the bin, even when the lid is off. The worms and gnats seem quite happy in there.

    The other bin always has ones trying to escape, gnats and worms… One worm even crawled up the side like a snake, (Twas a Euro.) it ‘looked’ over the edge and shook it’s head at me. I read about worm anatomy, but it still seems like it was chastising me. (I’m going to re-work the bin like the other. It was my first bin. So it sucks.)

    • Mike
    • June 10, 2010

    Has anyone tried an electronic bug zapper for controlling fungus gnats / fruit flies? Size wise these pests are about the same as mosquitoes but I’m not sure they’re attracted to UV light. I noticed a small model advertised for $30 recently but hesitated because of the power required (not a very green solution). Perhaps it would only have to be on for a day or two at a time?

    • Peter
    • July 21, 2010

    I’ve found that a newspaper top sealing the top of my bin stopped the fungus gnats in about two weeks for me. Two pages thick layed down on top of the bedding and glued to the sides of the bin (sticks when wet) so there’s no exit for the gnats. They did still get out sometimes which I dealt with by hand (as they like to crawl, not a difficulty 😉 ) each day when I checked up on them. But by the end of two weeks I don’t have them any more.

    Not sure if they don’t like the enclosed space created by the wet paper top and didn’t breed, or maybe the adults did work their way out but couldn’t get back in after mating to lay more eggs. Note, I do have low side vents that have aquarium filter ‘floss’ on the inside that goes up to the top of the bedding, giving the side vents open space to aerate from top to bottom. So sealing the top with paper didn’t cause a problem.

    This worked while top feeding, I had a nice mushly food layer right on top under the paper with an older area which was black with castings and worked on bedding. The worms seemed to like it with the topfeeding. When I lifted up the paper lid I usually saw some worms running through the gunk on what would have been the surface without the paper lid.

    • carrie borgenicht
    • January 7, 2011

    I just read your article @ fungus gnats. I’m fairly certain my home invasion commenced when I brought my houseplants in for the winter. I’ve had a worm bin in my basement for years, and fungus gnats just became a problem for me this fall, shortly after bringing my plants inside.

    I was particularly interested in the control solution someone suggested above @using coffee grinds. This perplexed me, because the concentration of fungus gnats in my home is around my coffee maker. I finally investigated, and found that the gnats were BREEDING in the used grounds stored in the machine! Yes, indeed, there were gnat larvae squirming throughout the grinds awaiting emptying. I can’t imagine how they would repel fungus gnats!

    • Peter
    • January 8, 2011

    For houseplants I’ve found that getting pots that water from the bottom using a wick works (self watering pots). You can then keep the plants watered without having the top wet and feeding the gnats.
    Although if you add a lot of water in the bottom, it can go all the way to the top and get the gnats going again. So water as needed, but try and keep the top of the soil dry.

    It’s also nice if you have hard water, watering from the bottom stops the calcium crust you can get on the top of the pot.

  2. Pingback: Gnats In My Worm Bin | Farming

    • rap
    • June 22, 2011

    Gnats and Worm Bins
    The worms and I were doing just well without them. However, one day I screwed up my routine and got them.
    Worms love used coffee grounds. Gnats don’t.
    I drink way too much coffee and so I make sure to share enough of the used grounds with the worms and I add dry bedding on top of all the damp stuff and then top my bin off with dry newspaper. It’s been keeping the gnats away.
    Figuring out just the right wetness/dryness to keep worms healthy and happy and gnats unwelcome and dissatisfied seems to be the key though it can be difficult to monitor in a busy world and so used coffee grinds are a regular additive to my worm bin.
    I’ve read that used coffee grounds can make worms hyper but mine have been with me for a year now and they replenish themselves and appear thriving. I’ve even given some away to my relatives to start their own worm compost. Gnats gnats stay away!

    • Grace
    • August 6, 2011

    Hi, the first video for Fungus Gnats in Worm Compost Bins, doesn’t work, it is now listed as a “private” youtube video.

    Thanks for all the info! Grace

    • AM
    • September 9, 2011

    The fungus gnats (that is what I am presuming they are) got started in my worm bin. After putting a sheet of newspaper of the top of the bedding material, the problem pretty much stopped. I still see a very few small ones flying around now and then, but I think that problem is basically solved.

    My dad keeps used coffee grounds in an old coffee can and throws them out after it fills up. He doesn’t usually close the lid either. It just lays on top of the coffee can. The contents are moist.

    The gnats from the worm bin got established in the coffee grounds. I noticed an abundance of gnats around the can and opened it. I saw maybe a hundred and fifty or so pupae and a few larvae. Also a handful of gnats, although I’m sure most of the gnats got out of the container.

    Summary: Coffee grounds are NOT a deterrent for fungus gnats (assuming that they were in fact fungus gnats).

    • rap
    • September 10, 2011

    Hi AM,
    Gnats can be so frustrating!

    I read that your dad’s coffee grounds are moist. Moist coffee grounds get moldy. Gnats love moisture. I dry my used grounds and then add them.

    I lay the dry coffee grounds completely over the surface which I then cover with some dry dead plant material and then I tuck them all in with a newspaper which may be dry or wet depending on the overall dampness in the worm bin.

    When I do wet the covering newspaper I then add a dry piece on top.
    This does work. The only time I ever have a problem with them is when I don’t do this.

    I currently have 2 worm bins side-by-side and one is moister than the other on purpose.
    The moister worm bin includes no dry material on top.
    It accumulated gnats.
    The drier worm bin includes the materials mentioned in the previous paragraph.
    It has zero gnats.

    I also learned that I have to be careful about how “dry” or “wet” I let the worm bin get.
    If it’s too dry the worms don’t do well.
    If it’s too wet the worms don’t do well.

    I like using the “dry” grounds. There are plenty of them and they are also good for the soil.
    I use them directly in my garden beds too. I always use dry so they don’t mold.

    My Summary: Dry coffee grounds ARE a deterrent for fungus gnats. Moist and/or moist moldy coffee grounds ARE NOT a deterrent for fungus gnats. Dry coffee grounds together with the correct moisture and toppings work wonders. Read my whole “Gnats In My Worm Bin” article for the whole technique. Notice that there I also specify “Dry” coffee grounds and add “Dry” layers.

    Have to find the happy medium.
    Sounds like you found yours! Good-luck!

    • rap
    • September 10, 2011

    Hi AM
    I really like this web site and all the ideas and feedback that folks offer.

    Besides the ideas listed here you may also want to read:
    My “Worm Food” post. It might also give you some ideas on how to prevent gnats in the worm bin.

    I do think that the moldy moisture of the grinds sitting in the coffee can may have been the problem you were experiencing.
    I say this because I have trays of wet coffee grinds drying on racks in my kitchen for both direct feeding in the garden as well as for the worm bins and nothing ever bothers them but these grinds are being air dried and are stirred around not allowing them to get moldy.

    • mike
    • November 9, 2011

    Take a clear plastic jar at least 1 quart. Take a peach or grapes and freeze them solid then thaw and crush. Put in the jar and add a handful of fresh grass clippings chopped fine or a handful of alfalfa meal. Add 1/2″ non chlorianated water.

    Drill 4 1/8 ” holes at random spots above the line of this mess. Gnats will be attracted in but cannot find their way out. Replace contents every few days as it’s the sweet smell that attracts them. A handful size lump of rotting alfalfa meal will attract 1000’s. Open jar under water un a bucket to kill but outside as many will float up and survive.

    • Richard
    • November 20, 2011

    I’ve seen a lot of Venus flytraps appearing on the market in location such as Walmart, Lowes, etc. I’m thinking of combining a little horticulture near my worm farm to fix my gnat/insect problems as they might arise. Has anyone tried or heard news of this being performed yet?

    • Night
    • January 23, 2012

    I just got a plant given to me as a gift because of fungus gnats in the soil, They thrive on moisture, after reading several webpages i still had no answers so i came up with my own after watching how they hatched and headed for wherever the most moister was generally on a wet window surface was generally collecting where the most sunlight was, I soaked a paper towel in vinegar folded it several times as to keep the moister from evaporating too quickly and placed it on the side of the planter where the sun hits, as they hatch they head straight for the paper towel and it kills them almost instantly, However make sure no vinegar gets on the plant as it is also used as a weed killer, In a few days all the new hatch lings are dead before they get old enough to lay new eggs into the soil, Works fast and very effective just add new vinegar as needed,I also found if i put the paper towel down onto the dirt as for a ladder to help them up speeds up the process… I am using apple cider vinegar

    • Jonas Jones
    • February 20, 2014

    We use a plastic barrel with small perforations for air and a screw on lid. We compost kitchen vegetable scraps and occasional grass clippings. The gnats, when you lifted the lid were very aggressive and thousands of them. I had seen one of the daughters on Alaska the last Frontier use diatomaceous earth (DE) to kill root grubs by spreading it around her plants. I used a scoop or two, sprinkling it over the large opening at the top of the barrel. As I sprinkled it I made sure it created a cloud of DE that the gnats flew through. I sprinkled the rest on the top of the compost material. If you Wiki DE you will read how it works and after one day apparently it has. All flying gnats are gone. Hopefully when the eggs hatch they will crawl through or eat some of the DE and die. I also sprinkled some DE around the top of the lid where ants were collecting and they are gone today as well. Sprinkled some DE around the base of the barrel on the ground to try to prevent other ants from coming aboard. According to other sources DE will not harm earthworms.

    • Bob
    • January 5, 2016

    I think it’s important to address the source of these insects. I have been indoor composting for several years now. I was also growing lettuce under fluorescent lights. Because I had brought in “starter” soil with worms from my outdoor compost, I DID have an insect problem but it was flies completely unrelated to fungus gnats (LARGE flies)that I had seen at outdoor pile. BUT, I didn’t have fungus gnats. The next year, I changed my bedding practice and bought peat moss for the job. That year I also grew lettuce and used Miracle Grow potting soil. I had lots of fungus gnats though I wasn’t confident from where they came. I was eventually able to eradicate them by trapping and exclusion methods. THIS year, I decided to pay attention and I have deduced that they are coming as desiccated eggs in the peat.

    I am going to moisten a bit and let it sit in a contained environment and see if the flies appear. I’m confident they will. I suspect bogs are perfect breeding grounds for these insects, they can survive freezing solid all winter, and their eggs can survive in a desiccated state.

    Bottom line – if you use store-bought peat and it isn’t claimed to be sterile, then you had best sterilize it yourself first.

Leave a Reply

Your email address will not be published.

Get Your Free Vermicomposting Guide!

* Join the Red Worm Composting E-Mail List Today *