Diatomaceous earth for fungus gnats in houseplants is often recommended online as a cure. It does kill insects that crawl through it while it stays dry, but the evidence for using it against fungus gnats is thin, and the one greenhouse study on it found no benefit when DE was mixed into potting media. This guide explains how diatomaceous earth for fungus gnats is supposed to work, what the research shows, how to use it safely if you try it, and the methods extension services actually recommend. It follows UC IPM, the National Pesticide Information Center (NPIC), Cornell Cooperative Extension and a 2005 HortScience study.
Fungus Gnats: What You Are Fighting
Fungus gnats are small, dark flies that hover around houseplant soil. UC IPM (Pest Notes 7448) explains that the adults are mainly a nuisance, while the larvae, small white worms with black heads living in moist soil, can damage roots and stunt growth when numerous. At 75°F, eggs hatch in about 3 days, larvae take about 10 days to develop into pupae, and adults emerge about 4 days later. So a new generation can appear in under three weeks, and any treatment has to keep working across overlapping generations.
UC IPM’s first advice is about water: avoid overwatering, provide good drainage, and let the surface of container soil dry between waterings. Wet soil is what keeps fungus gnats going. See our overwatered vs underwatered guide.
How Diatomaceous Earth Kills Insects
The National Pesticide Information Center explains that diatomaceous earth is made from the fossilized silica skeletons of tiny aquatic organisms called diatoms. It kills insects by absorbing the oils and fats from the cuticle of their exoskeleton so they dry out and die, and its sharp edges speed this up. NPIC notes that it remains effective only as long as it is kept dry and undisturbed. It is a physical killer, not a poison, and it does nothing to eggs.
Does Diatomaceous Earth Work on Fungus Gnats?
The research is limited. In a greenhouse study, Cloyd and Dickinson (HortScience, 2005) tested growing media containing different amounts of DE against fungus gnat larvae (Bradysia sp. nr. coprophila). Adding DE neither hurt nor improved control of second and third instar larvae, and the authors concluded that incorporating DE into commercial growing media may not benefit growers. They called for more research on larval susceptibility and on how moisture affects DE.
That fits what NPIC says about how DE works: it needs to stay dry, and fungus gnat larvae live in moist soil. A thin layer on dry soil may catch some larvae and adults that cross it, but we found no study showing it controls fungus gnats in pots. UC IPM’s fungus gnat guidance does not mention DE at all. Treat it as an optional extra, not a fix.
| Method | Evidence | Source |
|---|---|---|
| Let soil surface dry; improve drainage | Recommended | UC IPM, Cornell |
| Yellow sticky traps | Recommended for adults | UC IPM, Cornell |
| Bti for larvae | Recommended; repeat about every 5 days indoors | UC IPM, Cornell |
| Hydrogen peroxide drench (1 part 3% to 4 parts water) | Suggested by one extension page | Cornell (Allegany County) |
| DE mixed into potting mix | No benefit in a greenhouse study | Cloyd and Dickinson 2005 |
| DE dusted on dry soil surface | Untested in the sources found; works only while dry | NPIC |
Sources: UC IPM Pest Notes 7448; Acosta, Cornell Cooperative Extension Allegany County (2024); Cloyd and Dickinson, HortScience 40 (2005); NPIC.
How to Use DE on Houseplants (If You Try It)
- Dry the soil first. Let the top inch or two dry out, which on its own discourages fungus gnats (UC IPM, Cornell).
- Dust a thin layer on the dry soil surface, keeping it off leaves. A heavy layer just makes more dust.
- Keep it dry. Top watering wets it and, per NPIC, DE only works while dry. Cornell suggests switching to bottom watering for a while to keep the surface drier; see our bottom watering guide.
- Reapply after it gets wet or disturbed.
- Combine it with the proven methods below rather than relying on it alone.
“Wet” DE slurries: some guides suggest mixing DE into water and pouring it on the soil. Since DE only works once dry (NPIC), this adds no benefit over dusting dry soil, and it wets the soil you are trying to dry out.
Which Diatomaceous Earth to Buy
NPIC explains that food-grade DE is purified and is mostly amorphous silica, with only very low levels of crystalline silica, and that inhaling the crystalline form is associated with silicosis, chronic bronchitis and other respiratory problems. Buy a product labeled for insect control or food grade, and follow the label. Don’t use DE sold for pool filters, which is a different product made for filtration, not pest control.
Is Diatomaceous Earth Safe for Pets and People?
NPIC says very little DE is absorbed when eaten and that it is not poisonous, but breathing the dust can irritate the nose and airways, and large amounts may cause coughing and shortness of breath. The amorphous form has not been associated with cancer in people. Some DE products are labeled for direct use on dogs and cats, and NPIC advises following label directions and keeping products out of pets’ reach.
In practice: apply it gently to avoid making a dust cloud, keep pets and children away while you do, wipe up spills, and consider a dust mask if you are sensitive. See our cat-safe plants list for pet-friendly houseplants.
What Works Better: The Proven Methods
- Dry the soil surface: UC IPM says to avoid overwatering, improve drainage (for example with more perlite or sand in the mix) and let the surface dry between waterings. Cornell Cooperative Extension says to let the top 1 to 2 inches dry and suggests bottom watering for a while.
- Yellow sticky traps: catch adults; UC IPM suggests cutting them into small squares on skewers placed in the pots. Cornell calls them easy and effective.
- Bti: a bacterium that kills fly larvae. UC IPM notes it does not persist indoors, so infestations may need repeat applications about every five days; use a product labeled for your use. Cornell says you’ll notice the population drop after 4 to 5 weeks.
- Hydrogen peroxide drench: Cornell suggests one part 3% hydrogen peroxide to four parts water poured over the soil. Research on this is limited; see our hydrogen peroxide guide.
- Insecticides are rarely warranted for fungus gnats indoors (UC IPM).
For other options, see our guides to carnivorous plants for fungus gnats and neem oil, and if mushrooms are popping up in the same wet soil, our mushrooms in houseplant soil guide.
How Long It Takes to Get Rid of Fungus Gnats
Because a generation takes under three weeks at 75°F (UC IPM) and eggs keep hatching, expect to keep up drier watering, traps and Bti for several weeks. Cornell says Bti results show after 4 to 5 weeks. Sticky traps help you see when the numbers are falling.
For more on fungus gnats and mold in pots, see our guides to cinnamon and getting rid of fungus gnats.
Frequently Asked Questions
Does diatomaceous earth kill fungus gnats?
It can kill insects that contact it while it is dry (NPIC), but a greenhouse study found DE mixed into growing media did not improve control of fungus gnat larvae (Cloyd and Dickinson, 2005). It is not a reliable fix on its own.
Can I mix diatomaceous earth into potting soil?
It is not recommended. Cloyd and Dickinson (2005) found no benefit against fungus gnat larvae when DE was incorporated into growing media.
Can I water on top of diatomaceous earth?
Watering wets it, and NPIC says DE works only while dry. Bottom watering keeps the surface drier.
How to get rid of fungus gnats fastest?
Let the top of the soil dry, put out yellow sticky traps for adults, and treat the soil with Bti, repeating about every five days (UC IPM).
Is diatomaceous earth safe for cats and dogs?
NPIC says little is absorbed when eaten and it is not poisonous, but the dust can irritate airways. Follow the label and keep pets away while applying.
Does diatomaceous earth kill fungus gnat eggs?
No. It works on insects that contact it; eggs in the soil are not affected, which is why any treatment must continue for several weeks.
Sources
- Bethke, J.A. and Dreistadt, S.H. Pest Notes: Fungus Gnats. UC IPM Publication 7448
- National Pesticide Information Center: Diatomaceous Earth General Fact Sheet
- Cloyd, R.A. and Dickinson, A. (2005). Effects of growing media containing diatomaceous earth on the fungus gnat Bradysia sp. nr. coprophila. HortScience 40(6): 1806-1809
- Acosta, C. A Spooky Houseplant Pest: Fungus Gnats. Cornell Cooperative Extension Allegany County (2024)

I have been fighting gnats for nine weeks. I live in a senior complex where all our sewers are connected. We had a sewer problem and I got gnats as a result. The sewer problem has been resolved but I got gnats a short time after the problem was resolved. I have tried cleaning the drains and everything but the gnats will not go away. DE food grade is my last hope. Please let me know if you have any other suggestions. My plants are growing like crazy, I am not sure if the gnats are coming from the plants. I repotted all my plants with fresh soil and added cinnamon to the soil. I threw all the old soil away. I believe the gnats are coming from outside but I am trying everything to rid the gnats. Thank you for your help. I am letting my soil dry completely.
I’m sorry you’ve been battling these for so long, Imogene. Because they appeared right after the sewer problem, they may be drain flies rather than fungus gnats: drain flies are fuzzy and moth-like and rest on walls near sinks, while fungus gnats are slender, dark and hover around the soil. A yellow sticky trap beside each plant and one by your drains will show where they’re coming from, and if it’s the plants, letting the topsoil dry, adding a Bti product such as Mosquito Bits to your watering for the larvae, and dusting food-grade DE on dry soil for the adults should finally break the cycle.