Fungus gnats are those tiny, dark flies that hover around your houseplants every time you water. They’re the most common indoor plant pest — and their presence is almost always one message: your soil stays too wet.

The good news is they’re also one of the easiest pests to eliminate, because you don’t need harsh chemicals. You just need to break their lifecycle: kill the adults flying around, and remove the larvae living in the soil.

First, confirm it’s a fungus gnat

Not every small fly in your home is a fungus gnat. A quick look tells you which one you’re dealing with:

  • Fungus gnats — about 1/8 inch (3 mm), dark gray to black, with long legs and long antennae. They fly weakly, run and hop across the soil surface, and cluster around pots right after watering.
  • Fruit flies — slightly larger, reddish-brown and rounder. They hover around fruit bowls, trash, and drains — rarely around potted soil.
  • Drain flies — fuzzy, moth-like wings, usually found near sinks and drains.

If the flies appear near your pots and scatter from the soil when you water, they’re fungus gnats. No fruit bowl required.

Why they showed up in the first place

Fungus gnats lay eggs in damp, organic-rich soil. The larvae — tiny, clear worms with black heads — feed on fungi and decomposing matter in the top few inches of the pot. Wet soil means an endless food supply and a perfect nursery.

That’s the key point: the problem isn’t a dirty house. It’s a watering habit. Most fungus gnat outbreaks start when a pot stays consistently moist — exactly the condition that slowly drowns many houseplants too.

Method 1: Let the soil dry out

This is the single most effective step, and it costs nothing. Fungus gnat larvae need moisture to survive. Let the top 2-3 inches of soil dry completely between waterings and most of the larvae die off.

For most houseplants, that means watering less often than you think. A mature spider plant, for example, can easily go a week or more between waterings — check the soil with your finger before reaching for the watering can.

Method 2: Yellow sticky traps for the adults

Place a few yellow sticky traps near the soil surface or clipped to the pot rim. The adults are strongly attracted to yellow, get stuck, and die before they can lay more eggs.

Sticky traps won’t kill larvae, but they do two important jobs: they break the breeding cycle and they show you whether the infestation is shrinking. Replace them once they’re covered.

Method 3: Mosquito bits or dunks (BTI)

Mosquito bits and dunks contain Bacillus thuringiensis israelensis (BTI) — a naturally occurring bacterium that targets the larvae of fungus gnats, mosquitoes, and a few other flies. It’s harmless to people, pets, and plants.

Steep a quarter of a dunk (or a spoonful of bits) in water for about 30 minutes, then use that water on your plants. Repeat with every watering for 2-3 weeks — long enough to cover the full larval cycle.

Method 4: Hydrogen peroxide soil drench

Mix one part 3% hydrogen peroxide with four parts water and pour it slowly through the soil until it drains from the bottom. The peroxide kills larvae on contact and adds extra oxygen to the root zone — most houseplants appreciate that. Light foaming is normal.

Apply once a week for two to three weeks. It’s a gentle, short-lived treatment, so you can repeat it without building up residue.

Method 5: Top-dress the soil with sand or gravel

Cover the soil surface with a half-inch (about 1 cm) layer of coarse sand, perlite, or fine gravel. Larvae can’t crawl through the dry grit to reach the surface, and adults can’t reach the soil to lay eggs.

Keep the layer dry — water slowly so the top dressing doesn’t soak. Reapply after repotting. This is a favorite trick for plants that need consistently moist soil, where letting the top dry out isn’t an option.

Method 6: Repot with fresh, well-draining soil

For a heavy infestation, a repot is the reset button:

  1. Take the plant out of its pot.
  2. Gently shake or rinse off the old soil, including the root ball.
  3. Wash the pot with warm, soapy water.
  4. Repot in a fresh, well-draining mix with plenty of perlite or bark.

Fresh potting mix is much less inviting to gnats than the compacted, moisture-holding soil they’ve been breeding in.

Method 7: Switch to bottom watering

Water from the saucer or a tray and let the plant soak up what it needs, then empty any leftover water after 30 minutes. The top layer of soil stays dry, which makes the pot unappealing to gnats — and most houseplants take water up through their roots just fine this way.

Keeping them gone for good

  • Water less often, more deeply. Check the soil before every watering instead of following a fixed calendar.
  • Always use pots with drainage holes, and empty saucers after watering.
  • Quarantine new plants for a week or two — and consider repotting store-bought plants, which often arrive in heavy, peat-rich soil.
  • Build a simple routine. A weekly plant care checklist turns watering checks and pest inspections into a 10-minute habit, so an outbreak never gets a head start.
  • If you’re just starting out, pick plants that tolerate dry spells — our beginner houseplant guide lists ten of them.

The combination that always works is: dry the soil, trap the adults, and treat the soil once or twice with BTI or peroxide. Stick with it for three to four weeks and the gnats will be gone — and your plants will be healthier for it.