How to Get Rid of Fungus Gnats in Houseplants
Those tiny black flies around your pots breed in wet soil. Kill the larvae, dry the habitat, and break the life cycle for good — here is the exact routine.
Updated September 27, 2026
Why they are there
Fungus gnats lay eggs in the top layer of moist soil. Larvae hatch, feed on fungi and organic matter in the soil (occasionally nibbling fine roots), then become the next cloud of flies in about 2 to 3 weeks. Wet topsoil is the habitat — where it is dry, they cannot breed.
New plants, open bags of potting mix, and freshly spread compost are the usual ways they move in.
Break the life cycle on two fronts
- Dry out the topsoil — let the top 1 to 2 inches dry fully between waterings. Bottom-watering also keeps the surface dry while roots stay hydrated.
- Yellow sticky traps — catch the adult flies and, more importantly, show you whether numbers are falling.
- Beneficial bacteria — a watering with products containing Bacillus thuringiensis israelensis (BTI) kills larvae in the soil and is safe for indoor use.
- Sand or fine grit mulch — a half-inch layer on top of the soil blocks egg-laying females from reaching the soil.
The two-week routine
Set traps and apply a BTI soil drench immediately. Water from the bottom only, and only when the plant genuinely needs it. Repeat the drench weekly for 2 to 3 weeks — that spans the full life cycle so no new generation survives.
If gnats persist, the real source may be another plant in the room or a bag of open potting mix — treat every moist pot in the collection at once, since treating one just moves the population next door.
Make sure they are really fungus gnats
Fungus gnats are tiny black flies that walk in short, jerky bursts on the soil surface and rise from the pot when you water or disturb the soil. Fruit flies are slightly larger, tan to brown, hover around ripe fruit and the kitchen bin, and do not breed in potting mix.
The test is simple: lay a yellow sticky trap on the soil for a day. Gnats breeding in the pot stick to it quickly. If the traps stay empty but flies persist near the fruit bowl, your plants are innocent — and treating the soil will do nothing.
Keeping them from coming back
Quarantine every new plant for two weeks away from the rest of the collection, and if you have had an infestation, freeze or microwave fresh potting mix before using it indoors — eggs often arrive in the bag. Keep bags sealed and off damp floors.
Long term, the dry-surface habit is the only permanent control: bottom-water, let the top 2 inches dry between waterings, and keep a yellow sticky trap on the soil of your most moisture-loving plant as an early-warning system. If a trap catches more than a few flies in a week, restart the BTI routine before the population builds again.
How to get rid of fungus gnats in houseplants
- 1Set yellow sticky traps to catch adult flies and track whether numbers are falling.
- 2Apply a BTI (Bacillus thuringiensis israelensis) soil drench to kill larvae, and repeat weekly for 2 to 3 weeks to span the full life cycle.
- 3Let the top 1 to 2 inches of soil dry fully between waterings, and water from the bottom to keep the surface dry.
- 4Cover the soil surface with a half-inch layer of sand or fine grit to block egg-laying females from reaching the soil.
- 5Treat every moist pot in the room at once and seal or discard open bags of potting mix — treating one pot just moves the population next door.
Frequently asked questions
Are fungus gnats harmful to plants?
Adults are just annoying, and light larval populations do little harm. Heavy populations in weak or seedling plants can damage fine roots and invite disease — that is when treatment matters, not before.
Does hydrogen peroxide kill fungus gnat larvae?
Yes — a solution of one part 3% hydrogen peroxide to four parts water poured through the soil kills larvae on contact. Use it on a just-watered pot, expect a brief fizzing, and let it drain freely. It is a one-time knockdown, not a cure: drying habits and BTI keep them from returning.
Why do fungus gnats keep coming back?
Because something stays wet. Either the watering schedule keeps the topsoil moist, or a hidden breeding spot remains — an untreated pot, a saucer of standing water, an open bag of soil, or a plant that stays soggy because of poor drainage. Fix the moisture and the population cannot sustain itself.
Do fungus gnats bite humans or pets?
No. Adult fungus gnats are harmless to people and animals — they do not bite or sting, and larvae feed only on fungi and organic matter in the soil. They are a nuisance and a sign of wet soil, not a health risk.