Fungus gnats are one of those pests where the popular remedy and the actual biology don’t quite line up. Diatomaceous earth (DE) is a good example. Let’s get the honest answer first, then walk through how to actually use it.
The Short Answer

DE is real, and it does kill soft-bodied insects. But only on contact, and only when it’s dry. Fungus gnat larvae live down in the moist soil, feeding on fungi, decaying organic matter, and your plant’s roots.
That’s precisely the environment where DE stops working. A university study that mixed DE directly into moist growing medium found it had no measurable effect on fungus gnat larvae at all. Where DE does earn its keep is as a dry barrier on the soil surface.
It works on adult gnats walking across it, and on the sliver of the population that has to cross that dry top layer to emerge. It’s one tool in the kit, not a fix for the larvae doing the actual root damage.
What Are Fungus Gnats?

Fungus gnats are small, dark, mosquito-shaped flies with long, thin antennae, in the group Sciaroidea. The adults are mostly a nuisance; they don’t bite. But a single female can lay up to 200 eggs in her one-week lifespan, laid right into the top layer of soil.
The eggs hatch into larvae that burrow down into the soil. There they feed on fungi and decaying organic matter, and, when that runs short, on your plant’s own roots. That root feeding is the real damage.
Fungus gnats show up most in overwatered plants, often alongside other pests like aphids. That’s because the honeydew those insects leave behind feeds the fungi gnat larvae eat.
What Is Diatomaceous Earth?
Diatomaceous earth is the crushed fossilized shells of diatoms, a microscopic prehistoric organism. To us, it feels like fine powder. To a soft-bodied insect crawling across it, those fossil fragments are more like broken glass.
They abrade the insect’s outer cuticle, causing it to lose body fluids and dehydrate. It works by contact and by drying the insect out. That’s why moisture is its enemy: wet DE clumps and loses its cutting, absorbent edge.
Always use food-grade DE around plants and pets. Pool-grade DE has a much higher crystalline silica content and isn’t meant for this use. And even food-grade DE is a fine mineral dust.
When you’re applying it as a pesticide (not just the small amount that’s food-safe), wear a dust mask and eye protection, and avoid applying it near a fan, so you’re not breathing it in.
Does DE Kill Fungus Gnat Larvae?
Mostly, no — not where the larvae actually live. A 2005 University of Illinois study published in HortScience tested DE mixed directly into moist growing medium against fungus gnat larvae and found no effect.
The larvae feeding within the root zone simply weren’t exposed to enough dry DE to matter. Multiple university extension programs (UC IPM, University of Maryland, Colorado State) recommend Bti, beneficial nematodes, sticky traps, and, above all, drying out the soil between waterings for larvae control. None of them list DE as a larvae treatment.
DE’s real job is narrower. Applied as a thin, dry dusting on top of the soil, it can injure adult gnats walking across the surface, plus any larvae or newly emerged adults that have to cross that dry top layer on their way out.
The moment that layer gets damp again — from watering, humidity, or just sitting in a moist pot — it stops working. It won’t work again until it dries out.
So When and How Should You Use It?

DE is worth using as a supporting layer, not the whole plan:
- Let the soil surface dry first. This isn’t just prep for the DE. Drying the top of the soil between waterings is, on its own, one of the most effective ways to kill fungus gnat larvae, since they need consistent moisture to survive. Use the finger test: if the top inch or two is dry, it’s time to water; if not, wait.
- Dust a thin, even layer of food-grade DE on top of the dry soil. A light dusting is enough — you’re not trying to bury the surface.
- Reapply after every watering. Since DE only works dry, any watering or rain washes out its effectiveness. Extension guidance suggests checking and refreshing it roughly every 2–3 weeks, or sooner if you’ve watered.
- Don’t count on DE alone for an active larvae infestation. For the larvae actually feeding on roots below the surface, add a real larvicide to the routine:
- Bti (Bacillus thuringiensis var. israelensis), sold as a soil drench or as mosquito dunks/bits dissolved in your watering can — a naturally occurring bacterium that specifically targets fly larvae like fungus gnats and is considered safe around people and pets.
- Yellow sticky traps near the soil surface to catch adults before they lay another round of eggs.
- Beneficial nematodes (Steinernema feltiae), a soil-dwelling biological control some extension programs recommend for heavier infestations.
For more on using diatomaceous earth around houseplants safely, see our guide to diatomaceous earth in potted plants.
Aftercare and Prevention
Fungus gnats almost always come down to one of two things: overwatering, or an existing infestation that’s spreading. A few habits keep them from coming back:
- Water only when the plant needs it, not on a fixed schedule. Overwatering is the single biggest driver of both fungus gnats and root rot. Root rot, in turn, draws even more larvae to the damaged roots.
- Isolate any plant with a fungal infection or root rot. The fungus itself may not spread plant-to-plant. But it attracts gnats, which will happily lay eggs on your other plants too.
- Keep up with neem oil soil soaks or foliar sprays as ongoing prevention, especially if you’ve had aphids or scale. Their honeydew feeds the fungi gnat larvae eat.
Other Home Remedies Worth Knowing
A few other options show up often for fungus gnats, though they haven’t been through the same university testing as Bti or basic soil-drying:
- Diluted hydrogen peroxide (roughly 1 part 3% hydrogen peroxide to 4 parts water) as an occasional soil drench. It fizzes on contact with organic matter and can knock back larvae near the surface. It has no lasting residue, though, so it won’t stop new eggs from hatching later.
- Dish soap and apple cider vinegar traps for adults, similar in idea to a sticky trap.
- Cinnamon is another popular home remedy; see what cinnamon does and doesn’t do for fungus gnats before you rely on it.
Treat these as extra tools alongside drying your soil and using Bti, not as a substitute for either.
Nursing Your Plant Back to Health
Once the population is under control, give the plant a chance to recover: move it somewhere with good light and stable temperature, and resume a normal fertilizing schedule. A light dusting of DE on dry soil is a reasonable ongoing preventive. But remember: it washes away at the next watering. It’s maintenance, not a cure.
Frequently Asked Questions
Does diatomaceous earth work on fungus gnats?
Only in a limited way. Diatomaceous earth works dry, on contact, so its job is a thin dry dusting on top of the soil rather than a fix for larvae living in moist soil. Use it as a supporting layer, alongside drying the soil between waterings and treatments like Bti, not as the whole plan.
Does diatomaceous earth kill fungus gnat larvae?
Mostly, no. In a 2005 University of Illinois study, researchers mixed DE into moist growing medium and it did not negatively affect the larvae. They noted that larvae feeding within plant roots or stems may escape DE. Extension programs recommend drying the soil, Bti, beneficial nematodes, and sticky traps for larvae instead.
What gets rid of fungus gnat larvae?
UC IPM, University of Maryland, and Colorado State recommend drying the soil between waterings, plus Bti, beneficial nematodes, and sticky traps for larvae control. Colorado State University Extension says dry growing medium decreases survival of any eggs and larvae. None of these programs list diatomaceous earth as a larvae treatment.
Does diatomaceous earth still work after I water?
Not while the soil surface is damp. University of Illinois Extension says diatomaceous earth remains effective as long as it is kept dry and undisturbed, and the HortScience study notes it is less effective under moist conditions. Let the top of the soil dry out first, then dust on a thin, even layer of food-grade DE.
What precautions should I take when using diatomaceous earth?
Use food-grade DE, and remember that even food-grade DE is a fine mineral dust. When you apply it as a pesticide, wear a dust mask and eye protection, and avoid applying it near a fan so you’re not breathing it in.
