Window Harvest
← Back to Home
tips

How to Get Rid of Fungus Gnats for Good

Published 2026-02-27

You water your plants, and a cloud of tiny flies erupts from the soil. Congratulations — you have fungus gnats. They're one of the most common (and annoying) indoor plant pests, and almost every plant owner deals with them at some point.

The good news: they're more of a nuisance than a serious threat, and they're very fixable. Here's how to get rid of them and prevent them from coming back.

What Are Fungus Gnats?

Fungus gnats are tiny black flies (about 1/8 inch) that look like fruit flies. The adults are harmless — they don't bite and they don't eat your plants. The problem is their larvae, which live in the top layer of moist soil and feed on fungi, algae, and organic matter. In large numbers, larvae can nibble on fine root hairs, which weakens young or delicate plants.

Why You Have Them

One word: moisture. Fungus gnats lay eggs in consistently moist soil. Overwatering is the number one cause. They also love rich, organic soil mixes with lots of decomposing material. You might bring them home in a new bag of potting soil or on a new plant from the nursery.

How to Get Rid of Them

Step 1: Let the Soil Dry Out

This is the single most effective step. Allow the top 1-2 inches of soil to dry completely between waterings. Fungus gnat larvae can't survive in dry soil. Most houseplants can handle drying out a bit more than you think.

Step 2: Sticky Traps

Yellow sticky traps are incredibly effective at catching adult gnats. Place them near your plants or stick them directly into the soil. They won't eliminate the problem alone (the larvae are the real issue), but they'll reduce the adult population and break the breeding cycle.

→ Check Kensizer 20-Pack Sticky Traps on Amazon

Step 3: Bottom Watering

Instead of watering from the top, place your pot in a tray of water and let the soil absorb moisture from below. This keeps the top layer of soil — where gnats lay eggs — dry while still hydrating the roots.

Step 4: Sand or Gravel Top Layer

Add a half-inch layer of coarse sand, perlite, or decorative gravel to the top of the soil. Gnats can't lay eggs through it, and it dries out fast. This is especially useful as a preventive measure.

→ Find Horticultural Sand on Amazon

→ Find Decorative Gravel on Amazon

Step 5: Hydrogen Peroxide Drench (For Bad Infestations)

Mix one part 3% hydrogen peroxide with four parts water. Water your plant with this solution. It fizzes on contact with the soil, killing larvae on contact without harming roots. You'll see bubbling — that's normal. Let the soil dry before watering again.

→ Find 3% Hydrogen Peroxide on Amazon

Step 6: Mosquito Bits (The Nuclear Option)

Mosquito Bits contain BTI (Bacillus thuringiensis israelensis), a naturally occurring bacteria that kills fungus gnat larvae. Sprinkle them on the soil surface or dissolve them in your watering can. They're safe for plants, pets, and people. This is the most reliable solution for persistent infestations.

→ Check Summit Mosquito Bits on Amazon

Prevention

The Bottom Line

Fungus gnats are annoying but very beatable. Dry out the soil, set sticky traps, and if the problem persists, bring in Mosquito Bits. Within 2-3 weeks, you'll be gnat-free. The long-term fix is simple: water less.