Pests, Diseases & Problems
How to Get Rid of Fungus Gnats in Houseplant Soil
Fungus gnats breed in the top inch of wet soil. Fix the moisture and the population collapses — here is how, and what actually kills the larvae.
The Garden Magic Hub

- Level
- Beginner
On this page
Confirming it is fungus gnats
The adults are small, dark and weak-flying, and they drift up off the soil surface when you disturb the pot. UC IPM describes them as “about 1/10 to 1/8-inch long, gray to black, and slender, with long, delicate legs and one pair of clear wings.”
The larvae are the part that matters, and they are visible without magnification. Scrape back the top of the mix and look for what UC IPM describes as “a shiny black head and an elongate, whitish to clear, legless body.”
If the flies are hovering around fruit rather than soil, you have fruit flies instead, and nothing below applies.
The flies are not the population
An adult fungus gnat lives about 7 to 10 days. The eggs and larvae in your potting mix are the infestation; the insects flying at your face are the visible fraction of it.
This is why spraying the air achieves nothing lasting. UC IPM puts the full cycle at “about a month under typical indoor temperatures,” with reproduction continuing year-round indoors — there is no winter to break it for you.
Do they actually harm the plant?
Often not much. But the reassuring answer that circulates in the houseplant world is too generous.
UC IPM is explicit that larvae feed on roots and that heavy populations cause “sudden wilting, loss of vigor, poor growth, off-colored plants, and foliage loss.” Both larvae and adults can also spread plant pathogens.
Seedlings, cuttings and recently repotted plants have the least root reserve and the most to lose. A mature plant in a large pot will usually shrug them off.
Fix the moisture, or nothing else works
Fungus gnats need consistently damp organic matter in the top layer of the mix. Take that away and the population falls on its own.
UC IPM’s guidance is direct: “Overwatering and poor drainage may promote fungus gnat population growth. Eliminate standing water and allow soil to dry as much as possible between watering.”
In practice that means letting the surface dry properly between waterings, emptying saucers rather than letting pots stand in runoff, and using sterile mix when you repot. Bottom-watering helps for the same reason — it keeps the top layer, where the eggs are, dry.
What actually kills the larvae
The one biological control extension services consistently name is Bacillus thuringiensis subspecies israelensis — Bti — applied as a soil drench. UC IPM lists it among its recommended options.
Yellow sticky traps are worth using, but understand what for: they catch adults, which means they measure the population and trim it. They do not end it.
Contact sprays are the weakest option here. Colorado State Extension notes that short-persisting contact insecticides — pyrethrins, soaps, oils, neem — “do not provide sufficient long-term control of fungus gnat adults and require repeat applications at short intervals.”
Given a month-long cycle and adults that live barely a week, chasing them with a spray bottle is the least efficient thing you can do. Dry the surface out and wait.
- fungus gnats
- houseplant pests
- overwatering
- soil