How to Get Rid of Fungus Gnats on Houseplants (for Good)
Those tiny black flies are fungus gnats. Here's how to get rid of houseplant gnats for good and stop them coming back.
Those tiny black flies drifting up from your plant when you water it are fungus gnats. They’re harmless and beatable, and almost every case comes down to the same thing: soil that stays too wet. Fix the moisture, treat the larvae hiding in the dirt, and they’re gone.
Quick answer: how to get rid of houseplant gnats
Here’s the whole fight in five moves. The detail’s below:
- Let the soil dry out. Fungus gnat larvae can’t survive in dry topsoil. Stop watering until the top 2 inches are bone dry.
- Hang yellow sticky traps. They catch the adults, so the ones flying around now can’t lay the next batch of eggs.
- Treat the soil. Use Bti (a natural larva-killing bacteria, sold as mosquito bits) or a hydrogen peroxide drench.
- Switch to bottom-watering for a few weeks so the top layer stays dry while the roots still drink.
- Repot in fresh mix if the infestation is heavy or the soil is old and gunky.
Do all five together for a few weeks. One move on its own rarely works, because you have to kill the bugs you can see and the ones you can’t.
What are fungus gnats?
Fungus gnats are small dark flies, about an eighth of an inch long, with long legs and a weak, drifting flight. The adults are harmless: they don’t bite and they can’t hurt you, they’re just gross hovering over your morning coffee.
The trouble is in the soil. A single female lays up to 200 eggs in damp topsoil, and they hatch into tiny translucent larvae in the top inch or two of the mix. The larvae feed on fungus and decaying matter, and when food runs short they’ll nibble tender young roots. That’s the only real harm they do, and mostly only to seedlings or already-stressed plants.
One detail decides whether you win. Adults live only about a week, but a full generation from egg to adult turns over in three to four weeks. That’s why a single spray never works. You have to outlast every wave that hatches.
Why you have them
Two reasons, and the first one is almost always the answer.
Your soil stays too wet. Fungus gnats need damp topsoil to breed. If the top of your pot never dries out, you’ve built them a nursery. Usually that means you’re watering a bit too often, the pot has no drainage, or the mix holds water like a sponge. It’s the most common houseplant mistake, and the same root cause behind an overwatered plant and most root rot. If you’re not sure how often to water, start with our guide on how often to water houseplants.
Your potting mix came with them. Cheap or long-open bags of soil can already hold gnat eggs, so sometimes you bring the problem home in the bag or on a new plant.
How to get rid of fungus gnats, step by step
1. Let the top 2 inches of soil dry out
Start here, it does half the work for free. Larvae need that moist top layer to survive, so stop watering and wait until the top 2 inches feel bone dry before you reach for the can. Most houseplants are fine with a dry week, and it starves out a big chunk of the next generation.
2. Hang yellow sticky traps
Adults are drawn to yellow. Set a few sticky traps flat on the soil or just above it, and they’ll land and get stuck. This won’t touch the larvae, but every trapped adult is 200 fewer eggs.
3. Treat the soil to kill the larvae
Drying the soil helps, but to break the cycle fast, hit the larvae directly. Pick one:
- Bti (mosquito bits). The reliable one. Bti (Bacillus thuringiensis israelensis) is a soil bacteria that kills gnat and mosquito larvae when they eat it, and it’s harmless to people, pets, and plants. Soak a tablespoon of mosquito bits in water for 20 to 30 minutes, then water your plant with it. The larvae eat it and die within a day or two. Repeat at each watering for three to four weeks.
- A hydrogen peroxide drench. Mix 1 part regular 3% hydrogen peroxide with 4 parts water and water the plant until it runs out the bottom. It fizzes on contact, which is normal, and kills larvae while breaking down into water and oxygen. It doesn’t kill eggs, so repeat at each watering for a couple of weeks.
- A dry top layer of sand or Gnat Nix. Cap the soil with half an inch of coarse sand or a product like Gnat Nix (recycled glass grit). The surface dries fast and gives females nowhere to lay, so it works best once you’ve knocked the population down.
4. Bottom-water for a few weeks
Instead of watering from the top, sit the pot in a tray of water for 20 to 30 minutes so it drinks up through the drainage holes, then tip out the rest. The roots get a full drink while the top layer stays dry and hostile to larvae. Keep it up until the traps stay empty.
5. Repot in fresh mix if it’s severe
If the pot is crawling with them or the soil is old and sour-smelling, it’s often fastest to start over. Slide the plant out, brush the infested soil off the roots, and repot into fresh, fast-draining mix in a pot with drainage holes. More work, but it clears the eggs, larvae, and soggy soil at once.
How long does it take?
Give it two to four weeks to fully break the cycle. You’ll see far fewer adults within the first week, once the traps are up and the soil dries. It takes the full stretch because you’re outlasting every batch of eggs already in the pot.
The one thing that ruins it is quitting early. The moment you go back to soaking the topsoil, you hand them a fresh nursery. Stay consistent and they won’t come back.
How to keep fungus gnats away for good
Once they’re gone, keeping them gone is mostly just good watering habits.
- Water less, and let the topsoil dry between drinks. This is the whole game. No damp topsoil, no gnats.
- Use a well-draining mix in a pot with drainage holes. Chunky, airy soil dries faster than dense mix that sits wet for days.
- Store your potting soil sealed and dry. A fresh, quality bag beats one that’s been open and damp for months.
- Bottom-water the plants that keep getting trouble, so the surface never stays wet.
- Leave one sticky trap in the pot as a tripwire. A couple of gnats means catch it now, before it’s a swarm. Gnats hop between damp pots, so check your other plants too.
Fungus gnats are among the most common houseplant pests, and one of the least serious. To get ahead of the others, our guide to common houseplant pests covers the ones that actually damage your plants.
FAQ
Are fungus gnats harmful to my plants?
Mostly no. The adults do no damage at all. The larvae feed on fungus and organic matter, and only nibble roots when food runs low, so healthy, established plants shrug them off. Seedlings and stressed plants can suffer, so it’s worth treating either way.
Do fungus gnats go away on their own?
Sometimes, if your home dries out enough over a season. But don’t count on it. As long as the topsoil stays damp they keep breeding, and a small problem becomes a swarm. Treating them is faster and more reliable.
Does hydrogen peroxide kill fungus gnats?
Yes, it kills the larvae in the soil on contact. Mix 1 part 3% hydrogen peroxide with 4 parts water and water your plant with it. It fizzes, kills the larvae, then breaks down into water and oxygen. It won’t kill eggs, so repeat at each watering for a couple of weeks.
What smell do fungus gnats hate?
Cinnamon is the popular one, since its mild antifungal properties starve the larvae’s food source. A dish of apple cider vinegar with a drop of dish soap traps some adults. Nice extras, not a cure. Drying the soil and treating the larvae is what works.
Are fungus gnats the same as fruit flies?
No, though they get confused all the time. Fungus gnats are dark and long-legged and hang around the soil. Fruit flies are tan, rounder, and swarm around ripe fruit and the kitchen bin. If they’re coming from your plant pots, they’re gnats.
The takeaway
Fungus gnats look like a plague and act like a nuisance. Dry out the topsoil, trap the adults, kill the larvae, and stay consistent for a few weeks. Since soggy soil is what invites them in, it’s worth nailing your watering on your easier plants first, like a snake plant or a pothos, where a dry spell does no harm at all.
Sources & further reading: Colorado State University Extension, Fungus Gnats as Houseplant and Indoor Pests; US EPA, Bti for Mosquito Control (on the safety of Bti).