How to Get Rid of Fungus Gnats in Houseplants
The first time I noticed them, I was drinking coffee at my kitchen table and a tiny black speck lifted off the soil of my pothos and did a lazy loop past my face. I swatted it away and didn't think much of it. Then I noticed another one rising off the peace lily next to it. Then one more, drunk-flying out of the soil of a plant I hadn't even looked at in a week. By the end of that morning I'd counted six of them in a five-foot radius, and I was googling "how to get rid of fungus gnats in houseplants" with the specific dread of someone who thinks their whole indoor jungle is about to become a bug farm.
I want to tell you what I did first, because it's almost certainly what you're about to do, and it's almost certainly not going to fix anything.
The part where I made it worse
I bought sticky traps — the little yellow cards on plastic stakes — and pushed them into every pot I owned. Within two days they were speckled with dead gnats, which felt like progress. It wasn't. The traps caught the flying adults, but new ones kept hatching, because the actual nursery — the topsoil — was untouched. I also tried a diluted hydrogen peroxide drench, because a forum told me it would kill larvae on contact. It probably killed some. More kept coming. I was treating the symptom of the symptom and wondering why the gnats wouldn't quit.
Here's the thing I didn't understand yet: fungus gnats aren't an infestation that lands on your plants like bad luck. They're a wet-soil symptom. They lay their eggs in chronically damp topsoil, and as long as that topsoil stays damp, you will have a self-renewing gnat population no matter how many sticky traps you deploy. Sticky traps are useful for one thing only — they let you count the problem. They don't cure it.
Why the gnats kept coming back
Once I actually looked at what I was doing, the pattern was embarrassing. I'd been watering on a rough schedule — Sundays, whole apartment, everybody gets a drink — because that's what I thought responsible plant ownership looked like. But every pot in my apartment dries out at a different rate depending on the plant, the pot size, the potting mix, and the season, and a fixed schedule is one of the biggest reasons people end up with soil that's wet far more often than the plant actually wants. My peace lily, in a pot slightly too big for it, was stuck in a state I now recognize as classic: yellowing lower leaves, soil that was still damp a full week after I'd watered it. That's not a plant that's thirsty. That's the textbook signature of a plant sitting in wet soil long enough to start rotting at the roots — which, as it turns out, kills far more houseplants than any pest ever does. The gnats weren't the disease. They were the smoke alarm going off because there was actually a fire.
The frustrating part is that overwatered and underwatered plants can look almost identical from the leaves alone — droopy, yellowing, sad. You cannot diagnose it by staring at the foliage. The only honest tell is the soil itself: bone dry means thirsty, sopping wet for days on end means drowning. I'd been going by leaf appearance and calendar day, which meant I kept making the same mistake on a loop and blaming the bugs for it.
What actually stopped it
I stopped watering on Sundays. I started sticking a finger — and then, once I got serious, a cheap soil moisture meter — into the top inch of soil before I gave anything a drink. For most of my tropical plants, pothos and peace lily included, that meant waiting until the reading dropped into roughly the 20 to 40 percent range before watering again, not just waiting until the weekend rolled around. Letting that top inch actually dry out between waterings does two things at once: it stops root rot in its tracks, and it wrecks the gnat nursery, because gnat larvae can't survive in soil that dries out on a normal cycle. The fix for the bugs and the fix for the plant's actual health turned out to be the exact same fix.
It took about two weeks for the gnats to visibly thin out and close to three before I stopped seeing them at all, which lines up with what I've since learned is the normal timeline — you fix the watering, and the gnats resolve on their own, no sprays required, usually within two to three weeks. What I couldn't get over was how long I'd spent treating flies instead of soil.
The part that actually made the watering stick was ditching the guesswork entirely. I started logging the reading with Plant Tender instead of eyeballing pots and hoping — the app reads the meter through your phone camera and tells you, plant by plant, whether that number means water now or wait.
If you want the single number that predicts a gnat problem before the first fly shows up:
Check the top inch of soil three days after watering. If it's still reading above about 50% — a digital four-in-one shows soil moisture as a percentage, so that's the number on the screen — that's a viable gnat nursery, and it will stay one until that surface layer dries between waterings. Larvae cannot complete their cycle in topsoil that reaches the 20–40% band before the next drink.
The gnats are downstream of that one measurement. Read the figures as bands, not precise cutoffs — the probes are cheap conductivity sensors, two of them disagree in the same pot, and fertilizer salt raises the number with no extra water present. Note also that this is the one case where you want a shallow reading: the eggs are in the top inch, so probe the surface layer for gnats even though you'd probe deeper to judge watering.
Logging it also showed me something I'd never have caught on my own: my peace lily had gone from drying out in about five days to staying wet for ten, which is exactly the slow drift toward a root problem that shows up in the data long before it shows up in the leaves — or the gnats. Why one meter and a camera beats a sensor in every pot, what to look for in a meter, and the ten-minute setup, if you're mid-swat right now and want to start before you buy a single sticky trap.
Common questions
How long does it take to get rid of fungus gnats?
Two to three weeks once the watering actually changes, with a visible thinning around week two. That's the length of the gnat life cycle — you're waiting for the adults you already have to die off without a new generation replacing them. If you're still seeing fresh gnats after a month, the topsoil is still staying damp somewhere, so the problem is a pot you haven't corrected rather than a treatment that failed.
Do sticky traps get rid of fungus gnats?
No, and this is the trap almost everyone falls into first. Sticky traps catch flying adults, which is satisfying and looks like progress, while the larvae in the damp topsoil keep hatching on schedule. They're genuinely useful as a measuring tool — a trap that's filling up faster than last week tells you the soil hasn't dried out yet — but they've never cured an infestation on their own.
Does hydrogen peroxide kill fungus gnats?
A diluted drench kills some larvae on contact, so it can knock the population down briefly. It doesn't change the reason they're there. Unless the topsoil starts drying between waterings, you'll be re-drenching indefinitely, and you're pouring more liquid into a pot whose actual problem is that it's already too wet — which is a strange way to fix a wet-soil issue.
Are fungus gnats harmful to plants?
The adults are harmless — they don't bite and they don't eat foliage. Large larval populations can graze on fine root hairs in seedlings and cuttings, but for an established houseplant the gnats themselves are rarely the real damage. What matters is what they're telling you: soil wet enough to breed gnats is soil wet enough to rot roots, and that's the thing that actually kills plants.
The close
The peace lily is fine now. Its leaves are dark and unblemished, the soil dries out on its own rhythm instead of mine, and the only thing hovering over its pot these days is steam from my coffee.