Check out social media gardening groups and you will find at least one post each day asking for ways to control fungus gnats. They are perceived to be a huge problem with seedlings and other indoor plants. Much of the online advice doesn’t work, so let’s swat some myths about fungus gnats.

This post uses affiliate links
What are Fungus Gnats?
Gardeners first notice fungus gnats because they fly around your head while tending plants. The adult is a small, delicate, mosquito-like fly, about 1/8″ in size, with one pair of clear wings. They are not strong fliers and usually don’t venture too far from the plants.
You might also notice the larvae (or maggots) in the soil, but they are quite small and usually stay underground. It has a black head and a whitish transparent body.

For a detailed description of fungus gnats, see How to Identify and Get Rid of Fungus Gnats. Adults live for about a week and during that time they lay a couple of hundred eggs in moist soil. The eggs hatch in 4-6 days and the larvae feed for two weeks, on mostly dead organic matter but they can also feed on plant roots. They then pupate for 3-4 days before new adults hatch out.
The actual duration of the life cycle depends on temperature and is much longer in a cold basement.
Do Fungus Gnats Harm Plants?
This seems like it should be a simple question, but it’s not very clear how much damage they cause. The term fungus gnat is used for a number of species that are very difficult to identify. Some species harm plant roots, but most live just on fungus and decaying organic matter. It is quite possible that your gnats are doing very little harm to the plants.
Do You Really Have Fungus Gnats?
One of the big problems with online discussions is that many gardeners have pests that they call fungus gnats but are actually completely different pests such as fruit flies and drain flies. The following remedies may only work on fungus gnats so make sure you identified your pest correctly.
Killing Fungus Gnats
Now that you understand the life cycle, it becomes clear why people report that some treatments don’t work. If you kill the flies, they just come back again, because the soil is full of larvae and pupae that have not yet hatched.
On the other hand, if you treat the soil to get rid of the larvae, it has no effect on the existing flies. You have to wait until they die of old age and in the meantime they are laying more eggs.
You have a couple of options. Kill the flies and larvae at the same time, which probably requires the use of two different techniques, or kill one and wait for the other to die of natural causes. Keep this in mind while we discuss the following potential solutions.
Let Plants Dry Out
Keeping soil dry does two things. It makes it harder for existing larvae to survive and it discourages flies from laying new eggs. It does not get rid of existing flies.
Try to avoid soil containing peat moss as it tends to hold water longer. Unfortunately, almost all seedling and potting mixes use peat moss. I doubt that Coir is any better.
Drying the soil does work, and it might even make your plants grow better.
Stop Fungus Gnats With Diatomaceous Earth
Diatomaceous earth (DE) is used to kill insects and it works by absorbing oils and waxes on the outer cuticle. Without this protection, the insects dehydrate and die. Does it work for fungus gnats?
A recent study looked at this and concluded diatomaceous earth applied on top of the potting media does not work for controlling fungus gnats! Another study looked at mixing DE into the media and also found it didn’t control fungus gnats.
So why do so many people report DE as working? I think the reason is that DE is only effective when dry and many gardeners know this. So to make it work, they also dry out the soil. The drier soil kills off the larvae and prevents adults from laying eggs. Their positive anecdotal reports may just be a case of misidentified cause and effect.
Peroxide Soil Drench
Some claim peroxide kills the larvae and eggs of fungus gnats, but I could not find a reliable source that confirms this. When peroxide is applied to soil it is quickly deactivated as it reacts with anything organic, including bits of dead plant material, bacteria, fungi, and fungus gnat larvae. That sounds promising, but it also reacts with plant roots, harming them.
A low dose will be deactivated quickly with little effect, and a high dose would not be good for plants. I am not convinced this is a good option.
Cover Soil with Sand
Many report that sand on top of the soil prevents flies from laying eggs, thereby solving the problem. Some anecdotal reports say it also prevents flies from hatching out, but I have my doubts about that.
If egg-laying is stopped, the gnats should be gone in about 4 weeks.
A study by Purdue University found that a layer of sand did not reduce fungus gnats. This work is reported as part of a summary on fungus gnats and does not seem to have been published.
One report suggested that a covering of sand does not work, because the flies lay eggs in the pot’s drainage holes. That makes sense, so if you try this method cover the holes in the pots.
Numerous anecdotal reports exist, but they generally lack information about the type of sand, or the thickness applied. These reports are almost always accompanied by the suggestion that you should keep plants drier. So was it the dry soil that worked, or the sand?
Smaller grains of sand, and/or a thicker layer may work. The top layer would be relatively dry and contain very little organic matter; not a perfect place to lay eggs. A thicker layer also makes it harder for the small flies to reach the soil. How thick does this need to be? Nobody knows.
Bounce Fabric Dryer Sheets

Bounce® original brand fabric softener dryer sheets were tested to see if they repel fungus gnats and they did work, to some extent, in a special laboratory environment. Fungus gnats were put into the center compartment of a special chamber and allowed to fly toward one of two ends. This resulted in fewer flies in the end containing the drier sheet.
When wet soil was compared to wet soil + a piece of drier sheet sitting on the soil, the wet soil had twice as many gnats as the one with the drier sheet. But the drier sheet still had gnats. The testing did not test hanging the drier sheet next to plants which is what most gardeners would do.
The testing also used very fresh drier sheets. Many of the chemicals on the sheet are volatile and old sheets may not work nearly as well.
This is interesting, but not proof that this works in a real world situation, although some nurseries are inserting drier sheets into pots in the hope of controlling this pest.
Change All of the Soil
I see this recommendation a lot but it doesn’t make any sense. If you have flies, they will just lay eggs in the new soil. If you have several plants you would need to change the soil in all pots and wash all roots thoroughly. Don’t bother.
Coir Keeps Fungus Gnats Away
Some manufacturers of coir claim that it does not allow fungus gnats to grow but a recent study shows this is not true. They grow in both coir and peat moss.
It seems the type of soilless media has little impact on egg-laying.
Yellow Sticky Traps for Fungus Gnats
Place yellow sticky traps near plants, and right on the soil surface. Flies are attracted to them, stick, and die. You can buy these or make them yourself, but many home recipes don’t work very well. The DIY suggestions online include coating with Vaseline, honey, glue, and motor oil. I asked if these work in Facebook groups and the answer is no. There is a commercial product called Tangle-trap that might work when it is applied to yellow cards. The commercial products do work to control and monitor populations but they won’t get every last fly.
Yellow sticky cards have no effect on eggs, larvae or pupae, but over a 2-3 week period, you will get rid of most of them, as new flies hatch out.
These work as a monitoring system to tell you when you have a problem and they will catch some flies, but they are not effective enough to eliminate the problem.
Bacillus thuringiensis Kills Fungus Gnats
Bacillus thuringiensis subsp. israelensis or Bti, is a naturally occurring soil bacteria that is toxic to a variety of insects. When it is eaten by larvae, it kills them. It won’t get rid of existing flies or pupae, but the flies should be gone in about 4 weeks because it controls the larvae.
Bacillus thuringiensis is available in various commercial products. A convenient one that is readily available is a product called Mosquito Dunks. Break it into small pieces, sprinkle a bit on the surface of the soil and water it in. Repeat in 30 days. They can also be used to stop mosquitoes from breeding in rain collection barrels.
Nematodes for Fungus Gnats
Nematodes can also be used, but not everyone reports good results with them. That is due to poor storage of the product, not because they don’t work.
First of all you have to get the right species of nematode, Steinernema feltia.
Secondly, they have to be stored cold and they have a short life span. If you get them shipped, they need to be kept cold, but not frozen, during shipping. Big box stores and Amazon are not good places to buy live biologicals because they don’t provide the storage needed.
For houseplants and seedlings, you usually need them in winter when nurseries are not open.
You can check to see if your purchased nematodes are alive. Put a small amount of a glass dish, and add a couple drops of water at room temperature. Wait a few minutes and use a magnifying glass and a black background to check for activity. They should be swimming. If they are straight and not moving, they are dead.

Controlling Fungus Gnats in the Home
The best option for the home gardener is to control watering. Keep plants drier and you will eliminate most issues with fungus gnats. Be aware that it will take weeks to clear up a problem with any method you use, so don’t give up on it.
A second option is Bti. It is effective if placed in each pot and it’s readily available. It is not a quick fix since it only kills the larvae.
Nematodes do work but are tricky to use and not easily available to home gardeners. The other options listed above either do not work, or there is no scientific evidence to support them.
I wish I had this post last year! Went through several recommended remedies and only saw success when the dirt dried out.
Need oil is another suggestion I saw mentioned often. Might be worth including here.
Thank you for running this website!
What do you think of using crushed Mosquito Dunks mixed into the soil used for seedlings and/or container vegetables? Or is it more effective mixed with the water? My thought is preventing my growing veggies from getting decimated by insects all season.
I doubt it makes a difference.
BTI is the way. I contacted by phone the manufacturer of Mosquito Dunks and was told to pulverize one puck and toss in a 5 gallon pail of water. Stir up the top inch or two of soil in your plant and water with the mix. Stay on it for 4 weeks. This kills the larvae but not the adults flying around. Treat them like any other flying insect. Adult Fungus Gnats tend to return to the plant they were hatched from.
If you’re not worried about the plant’s roots, I have found I can keep the population down to a manageable number by having a carnivorous plant nearby. Bonus: it feeds the carnivorous plant! But I mostly do this to keep the annoying gnats from flying around and bothering me.
Sand works in my experience. I have sand as growing media in some of my pots and they never get infested. Regular garden soil used as potting media – same thing. Only peat based media has had fungus gnats in my home.
I use fly poison pellets to kill the larvae, needs several weekly applications though.
Robert, I’m having this very problem now for the first time ever. Which method would you suggest I try? I do have dryer sheets on hand, am I supposed to wrap them around the pots or should they be inserted into the potting mix directly? The bacillus I’d have to go buy. I think I’m having trouble because of our unusually cooler evenings, and it’s harder to balance the moisture in my pots even though I’m not adding additional moisture to them.
Dry the pots out, and lay the drier sheets on top of the soil.
Dryer soil is fine for plants and seedlings, not so much for germination. Need to control them during long germination processes, for example, Lisianthus
Another good reason to germinate in baggies.
https://youtu.be/dirz0WIMQi0
Here is some food for thought.
I have 2 orchids and every year or two I change the mulch and keep them moist and cozy.
Sometimes seat on the couch few yards away , kitchen table same distance or one of the bedrooms and read or work on the laptop.
Few years back I noticed a small fly that is not the robust and stocky drosophila flying around my display or coming and insisting to seat on my finger, not intimidated if I try to wave or push her away First time I just smashed with a book and then few min later an other one showed and had same behaviour, immediately landing on my gingers, stop flying but still moving agitated as if something is urgent and I am needed. Thinking where she may have come from I suspected the flower bed and when I check the mulch was very low in moisture.
Thinking about the fly behaviour i went and add water to the pots and in less than minutes the fly was gone. I never noticed any at any time flying around the flowers and rearly saw more than one or two scurrying through the mulch and never leaving the mulch.
With one exception: when the moisture level was to low and never more than one at the time following me in the house as far as 30 -50 feet to let me know that water is needed at the flowers. As soon as the water or ice is provided the gnat feels it (?) and is gone from my finger or display until next time water is needed.
I let the flowers out at night or during rains but the gnat is still there and it behave the same for the past several years.
Would love to see your research into neem oil as a remedy as well, since I’ve seen it commonly mentioned to combat fungus gnats as well as just general purpose pest control.
I tried every one of his suggestions in the past without success. I bought Eco-neem online and have not had any gnats for three years.
Do you think mosquito bits have the same effect if used in a tea-bag fashion in water for a few days, where the actual bits aren’t used in the plant?
no idea.
I have used 4 tablespoons of mosquito bits per gallon and let it soak for an hour. Last year it killed the fungus gnats, the mint, parsley and scallions loved the mosquito bits but my peppers and okra did not. But my pepper and okra were not super healthy last year because I did not use enough fertilizer. This year I used more fertilizer and the peppers are much healthier, I just did my first round of mosquito bits and I will wait and see how the peppers do.
I use vermiculite on the top of my soil in the pots and it seems to work. I also water from the bottom.
What kind of controls did you use? Without controls you won’t know it works.
I use nothing, and it is working as well.