How to Get Rid of Fungus Gnats in Houseplant Soil

Letting your soil dry out completely will not kill fungus gnats — and that’s exactly the mistake that keeps most houseplant owners trapped in a cycle of reinfestation for months. The larvae live in the top 2–3 inches of soil, and by the time you see adults hovering around your windowsill, there are already hundreds of eggs and larvae already feeding on your plant’s root system underground.

Here’s what actually works: you have to attack all four life stages simultaneously, not just the adults you can see. A single female fungus gnat can lay up to 200 eggs in her short 7–10 day lifespan, and those eggs hatch within 3 days at room temperature. If you’re only killing adults with a spray, you’re losing the race before you even start.

Why Overwatering Isn’t the Real Problem (And What Is)

Every article about fungus gnats tells you the same thing: “stop overwatering.” That advice isn’t wrong, but it’s incomplete in a way that keeps people frustrated. Fungus gnats don’t actually need standing water — they need consistently moist organic material, which includes the peat moss, coir fiber, and bark chips that make up most commercial potting mixes sold in the US. You could be watering perfectly and still have a gnat problem, because the real attractant is the decomposing organic matter in the soil itself.

The larvae are the damaging stage. They chew through fine root hairs and feeder roots, which explains why infested plants wilt, yellow, or suddenly stop growing even when the soil moisture looks fine. Fungal pathogens like Pythium and Fusarium actually hitch a ride on gnat larvae as they move through soil — so a bad infestation can introduce root rot diseases that outlast the gnats themselves. That’s a detail almost nobody mentions.

fungus gnats in houseplant soil close-up view

This close-up shows fungus gnat larvae in potting soil near the root zone — the stage that causes real plant damage and the one that most surface treatments completely miss.

How to Confirm You Have Fungus Gnats (Not Fruit Flies or Shore Flies)

Picture this: you’ve placed yellow sticky traps around your plants, caught dozens of tiny flies, and assumed you’ve confirmed a fungus gnat infestation — but half of what you caught might be shore flies, which don’t damage roots and require a completely different response. Misidentification is genuinely common, and treating for the wrong insect wastes time and money. Fungus gnats (Bradysia spp.) are slender, long-legged, and hold their wings flat when resting. Shore flies are stockier, shorter-legged, and have a rounder body profile. Fruit flies are tan or orange-brown with red eyes and are usually found near food scraps, not soil.

The most reliable confirmation method costs nothing: press a small piece of raw potato into the top inch of your soil, flesh-side down. Leave it for 48 hours, then lift it. If you find tiny white or transparent larvae — up to about 1/4 inch long with a shiny black head capsule — those are fungus gnat larvae, and you have an active infestation in that pot. Yellow sticky traps placed horizontally at soil level will also catch more adults than traps hung vertically above the plant, because adults spend most of their time near the soil surface, not flying at plant height.

The Soil-Level Treatment Stack That Actually Breaks the Cycle

Treating one life stage at a time is why most DIY attempts fail. A working treatment plan layers multiple products and methods so that eggs, larvae, pupae, and adults are targeted simultaneously — none of them get a free window to repopulate. Here’s the sequence that works, in order of application:

  1. Drench the soil with Bacillus thuringiensis israelensis (Bti). This is a naturally occurring soil bacterium sold as a product called Gnatrol or available in mosquito dunk form. Crushed into water, it kills larvae within 24 hours of ingestion without harming roots, beneficial insects, or humans. Apply once a week for 4 consecutive weeks to break the egg-to-adult cycle completely.
  2. Top-dress with food-grade diatomaceous earth (DE). Apply a thin, dry layer over the soil surface between waterings. DE lacerates the soft bodies of larvae attempting to migrate upward and dehydrates adult gnats that land to lay eggs. It loses effectiveness when wet, so reapply after each watering once the soil dries.
  3. Add yellow sticky trap cards at soil level. Place them horizontally on the soil surface or prop them just above it. Replace every 5–7 days. These don’t control an infestation on their own, but they dramatically reduce the adult population that’s actively laying eggs.
  4. Apply beneficial nematodes (Steinernema feltiae) for severe infestations. These microscopic roundworms actively hunt and parasitize fungus gnat larvae in the soil. They work within 48–72 hours and persist for several weeks when soil stays moist. They’re available online and at specialty garden centers — not always found in big-box stores.
  5. Switch to a well-draining soil mix going forward. Replacing the top 1–2 inches of potting mix with coarse horticultural sand or perlite after treatment creates a hostile environment for egg-laying. Females won’t deposit eggs in a dry, gritty surface layer — but the roots below in nutrient-rich soil aren’t affected.

The full cycle from egg to reproducing adult takes about 17–28 days at typical indoor temperatures of 65–75°F. That’s why 4 weeks of consistent treatment is the minimum — anything shorter and you’ll knock back one generation only to have the next one emerge from eggs laid before you started. Stopping early is the single most common reason people get a “second wave” infestation.

“The biggest error I see homeowners make is treating the adults as the primary target. Fungus gnat adults don’t feed — they don’t cause any plant damage at all. Every spray aimed at flying adults is wasted effort if you’re not simultaneously destroying the larval population in the root zone. Bti drenches are still the most effective soil-targeting tool available to the home grower, and most people have never heard of them.”

Dr. Raymond Hix, Extension Entomologist, University of Maryland Cooperative Extension

Which Products Are Worth Buying and Which Are a Waste of Money

Not all gnat products sold at hardware stores actually work on the larval stage, which is the only stage that matters for plant health. Before spending money, it helps to know what each product category actually does — and what it doesn’t. If you want a deeper breakdown of spray options safe for indoor use, the Best Fruit Fly and Gnat Sprays: Indoor Safe Options Ranked guide covers specific product testing in detail.

Product TypeTargets Which StageActually Works?
Bti soil drench (Gnatrol, mosquito dunks)LarvaeYes — highly effective
Yellow sticky trapsAdultsPartial — reduces adults, not larvae
Neem oil soil drenchLarvae (disrupts development)Moderate — less reliable than Bti
Hydrogen peroxide drench (1:4 ratio)Larvae and eggsYes — kills on contact but doesn’t persist
Indoor plant insect sprays (pyrethrin-based)Adults onlyNo — misses the damaging stage entirely
Beneficial nematodes (S. feltiae)LarvaeYes — excellent for heavy infestations

One thing worth noting: hydrogen peroxide drenches (one part 3% H2O2 to four parts water) kill larvae on contact through oxidation, but they break down quickly in soil and offer zero residual protection. They’re useful as an emergency knockdown in a severely infested pot, but they’re not a standalone solution. Pair them with Bti for the residual effect that H2O2 can’t provide.

Pro-Tip: Drop a mosquito dunk (available at hardware stores for around $10 for a 6-pack) into a gallon of water and let it soak for 30 minutes before using that water for your plants. One dunk can treat approximately 100 square feet of soil surface and lasts about 30 days in storage. This is the most cost-effective way to apply Bti consistently across multiple pots.

When to Consider Professional Treatment (And What It Actually Costs)

Fungus gnats in a few houseplants is a DIY situation — almost universally. But there are scenarios where the problem outgrows what home treatment can handle: a large indoor garden or greenhouse with 20+ pots, a commercial plant nursery, or a situation where the gnats are emerging from soil embedded in structural gaps or under a slab from root matter decay. In those cases, professional soil fumigation or repeated commercial-grade Bti applications may be warranted. For context on what you’d be looking at cost-wise, How Much Does Pest Control Cost? All Services Compared gives realistic price ranges for different service types.

It’s also worth acknowledging that climate and season genuinely affect how hard fungus gnats are to eliminate. In humid climates like the Southeast, or during winter months when indoor heating pushes people to water more frequently and soil stays damp longer, infestations rebuild faster. A treatment plan that works in 4 weeks in Colorado might take 6–8 weeks to show the same results in a humid Gulf Coast apartment. The biology doesn’t change, but the conditions that accelerate it do — and that’s an honest nuance most “quick fix” guides skip entirely.

Here’s what to watch for after you’ve completed a full treatment cycle:

  • Sticky traps show zero or near-zero adults for at least 2 weeks running — that’s your clearest sign the adult population has collapsed
  • The potato-chip test (raw potato pressed into soil) comes back clean after 48 hours — no larvae means the soil is clear
  • New plant growth resumes — if larvae were damaging roots, you’ll see the plant start recovering within 2–3 weeks of successful treatment
  • No new soil purchases without inspecting first — bagged potting mix is a leading vector for introducing new gnat eggs into a clean environment
  • Watch for re-emergence after bringing in any new plant from a nursery — quarantine new plants for 2 weeks and use sticky traps during that window before introducing them to your other pots

The last point is the one that trips people up most often. You eliminate the infestation completely, bring home one beautiful new plant from a garden center, and six weeks later you’re back to swatting gnats. Commercial nurseries sell infested plants constantly — not out of negligence, but because high-humidity greenhouse conditions are perfect for fungus gnats, and inspection at point of sale is nearly impossible at scale. Quarantine isn’t paranoia; it’s just how you protect the work you already did.

Fungus gnats are one of the few pest problems where doing less — watering less, adding fewer soil amendments, keeping the top layer of soil drier — genuinely helps long-term prevention. But getting there requires first understanding that the fly you’re chasing around your plant isn’t the enemy. The enemy is 1/4 inch long, white, and already underground. Start there, and the adults take care of themselves.

Frequently Asked Questions

how do I know if I have fungus gnats in houseplant soil?

The easiest way to tell is to let the top inch of soil dry out, then look for tiny dark flies hovering around your plants or crawling on the soil surface. You can also press a raw potato slice into the soil for 24 hours — fungus gnat larvae will burrow into it to feed, making them easy to spot. Adult fungus gnats are about 1/8 inch long and look like tiny mosquitoes.

what kills fungus gnat larvae in soil?

Bacillus thuringiensis var. israelensis, sold as Bti or products like Gnatrol and Mosquito Bits, is one of the most effective treatments — you water it into the soil and it kills larvae within a few days. Hydrogen peroxide is another option: mix 1 part 3% hydrogen peroxide with 4 parts water and drench the soil, which kills larvae on contact. You’ll likely need to repeat treatments every 5 to 7 days for 2 to 3 weeks to break the full lifecycle.

how long does it take to get rid of fungus gnats in houseplants?

Expect the process to take 3 to 4 weeks minimum, because you need to eliminate both the adults and the larvae still hatching in the soil. Fungus gnats go from egg to adult in about 3 to 4 weeks depending on temperature, so one round of treatment usually isn’t enough. Sticking with a consistent treatment plan every week makes a real difference in how fast you clear them out.

do sticky traps get rid of fungus gnats?

Sticky traps catch adult fungus gnats but they won’t solve the infestation on their own, since the real problem is larvae living in the soil. Yellow sticky traps placed just above the soil surface are useful for monitoring how bad the problem is and reducing the adult population. Use them alongside a soil treatment like Bti or hydrogen peroxide for the best results.

can overwatering cause fungus gnats in houseplants?

Yes — overwatering is the number one reason fungus gnats show up in houseplant soil. Females lay their eggs in moist soil, and the larvae feed on organic matter and roots in those wet conditions. Letting the top 1 to 2 inches of soil dry out completely between waterings makes the soil much less attractive for egg-laying and cuts off the food source larvae need to survive.

Disclaimer: This article is for informational purposes only and isn’t a substitute for professional pest control advice. Always read and follow the product label instructions exactly — label directions are legally binding and vary by brand and active ingredient. Keep all pesticides, baits and traps away from children and pets, ventilate treated areas as directed, and consider calling a licensed pest control professional if an infestation is large, recurring, or involves a structural pest like termites or carpenter ants.