How to Get Rid of Fungus Gnats on Houseplants

Disclosure: The Plant Pages is reader-supported. Some pages include ads and affiliate links, and we may earn a commission from qualifying purchases, at no extra cost to you.

Those tiny black flies drifting up every time you water are fungus gnats, and they breed in the damp top layer of your potting soil. Quick answer: to get rid of fungus gnats on houseplants, let the top inch or two of soil dry out between waterings, hang yellow sticky traps to catch the flying adults, and kill the larvae in the soil with a BTI product (mosquito bits) or a diluted hydrogen-peroxide drench. The adults die off in days, but because eggs and larvae are hiding in the soil, the full job takes a three- to four-week cycle. Do all the steps together and they won’t come back.

Why fungus gnats show up in the first place

Fungus gnats aren’t a sign you did something terrible. They’re a sign your soil stays moist. The adults are weak fliers, only a few millimeters long, and they’re drawn to wet potting mix where they lay eggs in the top layer. Those eggs hatch into translucent larvae with tiny black heads that feed on fungi, algae, and decaying organic matter.

Three things make an infestation likely:

  • Consistently damp topsoil. Frequent shallow watering keeps the surface perfect for egg-laying.
  • Organic-rich mixes. Soils heavy in peat, undecomposed bark, or compost give larvae plenty to eat.
  • Low light and slow growth. Plants that aren’t drinking much leave soil wet longer.

This is why the worst-hit plants are often overwatering-prone plants like the money tree and newly propagated cuttings — the soil around a rooting cutting has to stay damp, which is exactly the nursery gnats want.

Understand the life cycle before you treat

The reason quick fixes fail is the gnat’s short, overlapping life cycle. A single female can lay scores of eggs in the damp surface of a pot, those eggs hatch into larvae within a few days, the larvae feed and pupate, and a new round of adults emerges roughly a week or two later. At any given moment your pots hold eggs, larvae, pupae, and adults all at once.

That’s the whole secret to how to get rid of fungus gnats on houseplants: a treatment that only hits one stage leaves the others to repopulate. Squash every adult today and the larvae in the soil simply graduate into new adults next week. So the goal is never a single dramatic strike — it’s keeping pressure on every stage at the same time, for long enough that no new generation can mature. Once you accept that the fix is a multi-week campaign rather than a one-night cleanup, the rest of the plan makes sense.

The kill-and-prevent system, step by step

You can’t win by attacking only the adults you see. For every fly buzzing your face, there are eggs and larvae in the pot waiting to replace it. You have to hit both life stages at once.

Step 1 — Let the soil dry out

This is the foundation. Allow the top inch or two of soil to dry before you water again. Stick a finger in, or use a moisture meter if you want certainty. Dry surface soil kills eggs and young larvae and stops new eggs from being laid. On its own it’s slow, but it makes every other step work better — and on plants that tolerate it, you can let the soil dry out fully before watering again.

Most houseplants are far more forgiving of a dry spell than a soggy one, so err toward underwatering during the campaign. Drought-tolerant plants (succulents, snake plants, ZZ, pothos) will coast through having their soil dry out completely between waterings without complaint. The few exceptions are moisture-lovers like ferns and calatheas and anything actively rooting; for those, lean harder on the larvae treatments and prevention layers below rather than starving the roots.

Step 2 — Trap the adults

Hang or stake yellow sticky traps just above the soil line; the bright yellow color pulls the flies in and they stick. This won’t end the infestation by itself, but it does two valuable things: it cuts the number of adults laying new eggs, and it gives you a live readout of progress. When the traps stop filling up, you’re winning. A shallow dish of apple cider vinegar with a drop of dish soap nearby is only a minor supplement — fungus gnats aren’t strongly drawn to vinegar (they key in on damp soil and the color yellow), so it catches a few stragglers at best. Yellow sticky traps laid flat or staked low near the soil line are far more effective for gnats.

Step 3 — Kill the larvae in the soil

This is the step people skip, and it’s why gnats feel impossible to beat. You have two reliable options:

  • BTI (mosquito bits or dunks). BTI is Bacillus thuringiensis subsp. israelensis (Bti), a soil bacterium that’s lethal to gnat larvae but harmless to plants, pets, and people. Soak the bits in your watering can, then water the plant with that BTI-charged water. It poisons larvae as they feed. Repeat with each watering for a few weeks to catch newly hatched larvae.
  • Hydrogen-peroxide soil drench. Mix one part standard 3% hydrogen peroxide with three to four parts water and water the plant as usual. It fizzes on contact, killing larvae instantly, then breaks down into water and oxygen. It’s fast but only kills what’s present that day, so repeat over the cycle.

Step 4 — Bottom water and top-dress

Two finishing moves starve future generations. Bottom watering — setting the pot in a tray of water so it drinks from below for fifteen to thirty minutes, then pouring off the excess — keeps the surface dry where gnats breed while the roots still get a drink. And top-dressing the soil with a half-inch layer of coarse sand, fine grit, or horticultural pumice creates a fast-drying barrier the adults won’t lay eggs in and emerging adults struggle to push through.

Top-dressing is the single most underrated long-term move. A dry, gritty cap turns the one place gnats need — moist surface soil — into a desert, while the roots below stay perfectly happy. It also makes it harder to overwater out of habit, because you can no longer judge moisture by the look of the surface, which nudges you toward checking deeper and watering less.

What works fast vs. what takes a cycle

It helps to be honest about timing, because the slow steps are the ones that actually end an infestation.

MethodTargetsHow fastWhat it really does
Yellow sticky trapsAdultsImmediateCatches flyers, tracks progress; doesn’t touch larvae
Hydrogen-peroxide drenchLarvaeSame dayKills larvae on contact; only treats that day’s batch
BTI / mosquito bitsLarvaeA few days, repeatedMost reliable larvae control over the full cycle
Letting soil dry outEggs + larvae1–3 weeksFoundation; removes the damp breeding layer
Bottom watering + top-dressingPreventionOngoingStops new eggs being laid

The pattern is clear: traps and peroxide give you the satisfying quick wins, but drying the soil and consistent BTI are what break the breeding cycle. Most homes are gnat-free in three to four weeks if all of this runs together.

Signs it’s working

You don’t have to guess whether you’re winning. Watch for:

  • Fewer fresh flies on the traps each week. Old catches stay stuck, so judge by new additions.
  • No cloud of gnats when you disturb the soil or move the pot.
  • A quiet plant when you water. No flies rising up means the top layer is no longer a nursery.

If you still see steady numbers after two weeks, the larvae step is usually being under-done — increase the BTI frequency or do another peroxide drench. It’s also worth checking whether a forgotten pot in another room is acting as a hidden reservoir; gnats wander, and one untreated plant can reseed the whole collection. Treat every pot in the room, not just the obvious offender.

Common mistakes that keep gnats alive

  • Treating only the adults. Sticky traps alone leave the soil full of larvae. Always pair them with a larvae treatment.
  • Quitting too early. The flies vanish, you stop, and a hidden batch of eggs hatches a week later. Run the full cycle.
  • Watering on the old schedule. If the soil stays wet, nothing else matters. Let it dry.
  • Reusing infested soil or topping off pots from an open bag that’s been sitting damp.
  • Bringing in new plants unchecked. New nursery plants are the most common source. Quarantine them for a couple of weeks and inspect the soil before they join the rest.

For a deeper look at the gnat’s biology and management, Colorado State University Extension has a thorough, science-based write-up.

Keeping them gone for good

Once the population crashes, prevention is mostly about water discipline. Water less often and let the surface dry. Bottom water where the plant allows it. Keep a permanent layer of sand or grit on your most-affected pots. Choose well-draining mixes and go easy on soils packed with undecomposed bark or fresh compost, which feed larvae. Store any open bags of potting mix sealed and dry, since a damp bag breeds gnats of its own and reinfects every pot you fill from it.

New plants deserve special attention, because the nursery is where most infestations originate. Quarantine new arrivals away from your collection for two to three weeks, hang a sticky trap nearby, and watch for flies before you integrate them. If you spot gnats, run the same drying-and-larvae routine on the newcomer in isolation. And keep one sticky trap in the room permanently as an early-warning system — if a few flies appear, you’ll catch the problem before it becomes a swarm again. Fungus gnats are annoying, but they’re one of the few houseplant pests you can fully eliminate with patience and a dry pot.

Frequently asked questions

How long does it take to get rid of fungus gnats?

Adults you trap die off within a few days, but the soil holds eggs and larvae, so plan on a full 3 to 4 week cycle of drying out, trapping, and treating before the population truly collapses. Skipping the larvae step is why they keep coming back.

Do fungus gnats harm my plants?

Adult gnats are mostly a nuisance and don't bite people or eat leaves. The larvae feed on fungi and decaying matter in the soil but can also nibble fine roots, which is only a real problem on seedlings, cuttings, and small or already-stressed plants.

Will letting the soil dry out kill fungus gnats on its own?

Drying the top inch or two of soil between waterings kills many eggs and young larvae and is the single most effective step, but on its own it's slow. Pairing it with sticky traps and a larvae treatment clears an infestation much faster.

Does hydrogen peroxide kill fungus gnat larvae?

Yes. A soil drench of one part standard 3% hydrogen peroxide to three or four parts water kills larvae on contact and breaks down into water and oxygen. It works fast but only treats the larvae present that day, so repeat with watering and pair it with sticky traps.

What is BTI and is it safe for houseplants?

BTI is Bacillus thuringiensis subspecies israelensis, a naturally occurring soil bacterium sold as mosquito bits or dunks. It specifically targets fungus gnat and mosquito larvae, is harmless to plants, pets, and people, and is the most reliable long-term larvae killer.

How do I stop fungus gnats from coming back?

Water less often and let the top of the soil dry, bottom water when you can, top-dress pots with a layer of sand or grit, avoid soils heavy in undecomposed bark or compost, and quarantine and inspect new plants before they join your collection.