Those tiny black flies drifting up from your plant pots are almost certainly fungus gnats. They’re harmless to humans and rarely kill a healthy plant, but they’re annoying, they multiply fast, and their larvae can nibble young roots. The good news: they’re very beatable once you understand them.

Why you have them

Fungus gnats thrive in damp, organic potting soil. The adults lay eggs in the top layer; the larvae feed on fungus and decaying matter in constantly moist soil. That means the root cause is almost always overwatering — soil that never dries out is a perfect nursery.

Kill the moisture, and you kill the problem at its source.

The fix, in layers

The most reliable approach attacks adults, larvae and the conditions together.

1. Let the soil dry out

This is the most important step. Allow the top 1–2 inches of soil to dry between waterings. The larvae live in that top layer and can’t survive it drying out. For plants that tolerate it, let the soil go drier than usual for a couple of weeks.

2. Trap the adults

Place yellow sticky traps flat on or just above the soil. Adults are drawn to yellow, get stuck, and can’t lay more eggs. The traps also let you track progress — fewer catches over time means you’re winning.

3. Kill the larvae

For a stubborn infestation, treat the soil:

  • BTI (Bacillus thuringiensis israelensis) — sold as “mosquito bits.” Soak them in your watering water and use it to water the plants. BTI is a natural bacterium that kills gnat larvae but is harmless to plants and pets.
  • A hydrogen peroxide drench — mix 1 part 3% hydrogen peroxide with 4 parts water and water the plant with it once. It kills larvae on contact and fizzes harmlessly away.

4. Try a soil top layer

Covering the soil with a half-inch of coarse sand, fine gravel or “gnat barrier” stops adults reaching the soil to lay eggs and prevents new larvae surfacing.

Prevent them coming back

  • Water less. Let the soil surface dry between waterings — this alone prevents most infestations.
  • Ensure drainage and empty saucers so the pot never stays waterlogged.
  • Bottom-water where practical, keeping the top layer drier.
  • Quarantine new plants for a week or two before mixing them in with the rest.
  • Store potting soil sealed — bags left open can harbor gnats.

How long does it take?

The gnat life cycle is about 3–4 weeks. Expect to keep up drying, trapping and treating for a full cycle to break it completely. Don’t stop the moment you see fewer flies — the next generation may still be in the soil.

The bottom line

Fungus gnats are a symptom of soil that stays too wet. Let the top of the soil dry out, trap the adults with yellow sticky traps, and treat the larvae with BTI or a peroxide drench. Fix the watering habit behind it and they won’t return.