How to Get Rid of Fungus Gnats (and When Not to Bother)
Fungus gnats mean your soil is staying too wet. The little black flies drifting up when you water aren’t the problem, they’re the receipt. Here’s how to get rid of fungus gnats: fix the watering, catch the adults, and if seedlings are at risk, treat the larvae in the soil. That’s the whole job, and none of it needs a spray bottle.
Here’s the part most pages skip: on a settled houseplant, fungus gnats are annoying and not much else. On a tray of seedlings or microgreens, they matter. So before you do anything, work out which situation you’re in.

What are fungus gnats, and are they hurting your plants?
Fungus gnats are small dark flies, about 1/8 inch, that you notice when they lift off the soil in a loose cloud. The adults don’t bite, don’t chew leaves, and don’t live long. They’re a nuisance, not a pest, on their own.
The larvae are the ones doing anything. They live in the top 2 to 3 inches of the potting mix, they’re translucent with a black head, and they feed on fungi, algae, and rotting organic matter in constantly damp soil. When their numbers get high, they’ll also rasp at fine roots and stem bases.
What that means in practice:
- Established plant in a pot? A few gnats won’t kill a pothos or a monstera. The roots are woody and deep, the larvae are up top. It’s a cosmetic problem, and it usually fades once the soil dries out on schedule.
- Seed trays, cuttings, microgreens, young transplants? Now it’s real. Those roots are thin and shallow, right where the larvae are, and a heavy population can stunt or kill a tray. Act on this one.
Deciding which you’ve got tells you how hard to push. It’s the same call you make with most garden pests: is this really a problem at my scale, or am I about to spend two weeks fighting three flies?
How do you get rid of fungus gnats?
Three things, done together: let the top couple of inches of soil dry out between waterings, put out yellow sticky traps for the adults, and treat the larvae in the soil if seedlings are at risk. Keep it up for 3 to 4 weeks so you catch each new batch as the eggs hatch.
1. Let the top couple of inches of soil dry out
This is the one that actually ends it. Fungus gnat larvae and eggs need constantly moist organic matter. Take that away and the population crashes on its own.
Let the top 1 to 2 inches of mix go dry before you water again. The larvae sit a little deeper than that, but the eggs and the youngest larvae are right up in that surface layer, and drying it out breaks the cycle. Stick a finger in, or lift the pot, learn what dry feels like by weight. Most people water on a schedule because a plant “should” be watered weekly. Water when the pot needs it instead, and the gnats lose their nursery. If you can, water from the bottom so the surface stays drier while the roots still drink.
2. Put out yellow sticky traps
Flat yellow sticky cards, laid on the soil or pegged just above it, catch the adults. Every adult on a card is eggs that don’t get laid. They also tell you how bad it is and whether you’re winning: fewer flies stuck each week means the plan’s working.
Cheap, no chemistry, safe around pets and kids. Keep them going the whole time.
3. Treat the larvae, but only if you need to
If it’s just a houseplant and you’ve sorted the watering, you can usually stop here. If seedlings are at risk, or the population is big, go after the larvae in the soil. Two low-force options:
- BTI. This is a soil bacterium, Bacillus thuringiensis subsp. israelensis, sold to home growers as Mosquito Bits. You steep it in water or scatter it on the surface and water it in. It kills fly larvae, fungus gnats and things like mosquito larvae, and little else, and it’s considered safe around people, pets, and plants. Follow the label rate.
- Hydrogen peroxide drench. Mix 1 part regular 3% hydrogen peroxide with 4 parts water and use it in place of a normal watering, when the pot is already due for one. It fizzes, kills larvae on contact, then breaks down to plain water and oxygen. This one’s widely used but the university extension guides don’t cover it, so treat it as the backup to drying out and BTI, not the first move.
You don’t need to buy live organisms in for this. Beneficial nematodes get sold for fungus gnats, but the dry-out plus sticky traps plus BTI stack clears it without releasing anything into your home that then dies off and needs buying again.
4. Top the pots with a dry layer
A 1/2 inch of coarse sand, fine gravel, or grit on the soil surface makes a dry crust the adults won’t lay into and the emerging ones struggle through. It’s optional, it’s a good finish once the numbers are down, and it looks tidier than sticky cards forever.
Why do you keep getting fungus gnats?
Because something stays wet. Work through this list:
- Overwatering. Nearly always the answer. The soil never dries, so the cycle never breaks.
- A mix that holds too much water. Peat-heavy, fine, cheap potting soil stays sodden. Coarser mix with bark or perlite drains and dries faster.
- Fresh organic matter on top. Un-rotted compost, worm castings, or mulch on the surface is larva food. Dig it in or leave it off.
- A new plant brought them in. Nursery pots are often a bit gnatty. Quarantine new plants away from the others for a couple of weeks and check the sticky trap.
- A saucer that stays full. Tip it out after watering.
Get the watering right and fungus gnats mostly sort themselves out. That’s true of a lot of small-space growing problems. The fix is usually “do less,” not “buy more.”
How long does it take to get rid of fungus gnats?
3 to 4 weeks if you’re consistent. The adults you can knock down in days with traps, but there are eggs and larvae in the soil that keep hatching, so you have to hold the line across a full breeding cycle, which runs about 3 to 4 weeks at room temperature, before it’s over. Stop early and they come back.
The honest verdict
If it’s a houseplant: let the soil dry, put out a sticky trap, and get on with your day. You don’t need the peroxide, you don’t need the BTI, and you definitely don’t need a pesticide. It’ll pass.
If it’s seedlings or microgreens: take it seriously. Dry surface, traps, BTI, and keep it up for 3 to 4 weeks. Those trays are worth protecting.
Either way, the lasting fix is the watering can, not the shelf of products. Sort that and this doesn’t become a recurring thing.
FAQ
Do fungus gnats go away on their own? On an established plant, often yes, once the soil dries out between waterings. If you keep the mix constantly wet, they’ll keep breeding.
Are fungus gnats harmful to humans or pets? No. They don’t bite or carry anything. They’re a nuisance indoors, nothing more.
Will letting my plant dry out hurt it? Most houseplants prefer the top inch or two of soil to dry between waterings anyway. Seedlings are less forgiving, so for trays, lean on bottom-watering and sticky traps more than on drought.
Do I need bug spray for fungus gnats? No. Sprays hit the adults you can already catch on a card and do nothing to the larvae in the soil. Drying the mix and treating with BTI is more effective and doesn’t put pesticide in your kitchen.
What kills fungus gnat larvae in soil? Letting the soil dry out is the main one, backed up by a BTI drench. A 1:4 hydrogen peroxide drench also works but isn’t covered by the extension guides, so treat it as a fallback. Keep whichever you use going for 3 to 4 weeks.
The next small step
Pick up your worst pot and feel how heavy it is. That’s “wet.” Don’t water it again until it’s noticeably lighter and the top 2 inches are dry to your finger. Put a sticky trap on the soil while you wait. That one change fixes most fungus gnat problems before you’ve spent a cent.
If the gnats turned up in a tray of microgreens or seedlings, our guide to growing microgreens indoors covers watering those trays without keeping them soaked, which is where most tray gnat problems start. If you’re growing on a windowsill that doesn’t get much sun, growing food in low light has more on keeping mix healthy without overwatering to compensate. And the free apartment homesteading guide has the wider “grow more in a small space without it turning into a second job” version of all of this.