This guide contains affiliate links. If you buy through them we may earn a small commission at no extra cost to you. Learn more.
If tiny black flies drift up every time you water or brush past a plant, you almost certainly have fungus gnats. They're one of the most common indoor plant pests and, thankfully, mostly a nuisance rather than a threat. Adults don't bite, and healthy plants usually shrug them off. They are, however, annoying — and in big numbers their larvae can damage young plants and seedlings.
What fungus gnats are
Fungus gnats are small (about 1/8 inch), dark, weak-flying insects that hang around soil and windows. The adults lay eggs in the top layer of damp potting mix. The eggs hatch into tiny translucent larvae with black heads that live in the top couple of inches of soil, feeding on fungi, decaying organic matter and sometimes fine roots.
The whole cycle, from egg to adult, can take as little as three to four weeks in a warm home. That's why a few gnats can become a cloud — and why you need to treat for several weeks, not just once.
Not sure it's fungus gnats? Flies that hover around fruit bowls and the kitchen bin are more likely fruit flies, which have a different fix.
The 3-part plan
To get rid of fungus gnats, you need to deal with the adults and the larvae, and remove the damp conditions they breed in.
1. Let the soil dry out
Wet soil is the gnats' nursery, so this step does the most. Let the top 1–2 inches of soil dry completely between waterings (see our watering guide). Many larvae die when the surface dries out, and adults avoid laying eggs in dry soil.
Two habits help:
- Bottom watering: set the pot in a bowl of water for 15–30 minutes so the roots drink from below while the surface stays drier.
- Empty saucers after watering, and don't let pots sit in water.
2. Trap the adults
Yellow sticky traps catch flying adults before they can lay more eggs. Stick one in the soil of each affected pot, just above the surface. They also work as a monitor — if the traps stay clear for a couple of weeks, you're winning.
Traps alone won't solve the problem, because they don't touch the larvae in the soil.
3. Treat the larvae
Choose one of these:
- BTI (Bacillus thuringiensis subsp. israelensis): a naturally occurring bacterium sold as mosquito bits or dunks. It targets the larvae of gnats and mosquitoes. Soak the granules in water according to the package directions and use that water to water your plants for a few weeks.
- Hydrogen peroxide drench: a common home remedy is to water with a mix of 1 part regular 3% hydrogen peroxide to 4 parts water once the top inch of soil is dry. It fizzes on contact and kills larvae near the surface. Test it on one plant first, and don't overdo it.
- Top-dressing: covering the soil surface with about half an inch of coarse sand or fine gravel makes it harder for adults to reach damp soil to lay eggs.
Keep going for at least three to four weeks — long enough to cover a full life cycle — even after you stop seeing adults.
If nothing works
A heavy, persistent infestation usually means the soil is staying too wet. If a plant has been chronically overwatered, its mix may be broken down and soggy. Repot it into fresh, well-draining mix (our repotting guide explains how), removing as much of the old soil as you can, and adjust your watering.
How to prevent them
- Water less often, and only when the soil needs it. A moisture meter helps if you're unsure.
- Use pots with drainage holes and a well-draining potting mix.
- Store bags of potting mix sealed, and avoid leaving open bags damp.
- Check new plants before they join your collection: look at the soil surface and watch for flying adults for a week.
- Clear fallen leaves from the soil surface so there's less decaying material for larvae to feed on.
Fungus gnats are a sign that soil is staying wet — fix that, and they usually stop being a problem. For more on watering-related problems, see why leaves turn yellow.