Fungus gnats in houseplant soil: how to get rid of them

Fungus gnats lay their eggs in the damp surface of a pot’s soil, where their larvae then live: to get rid of them, let the top few centimetres dry out between waterings and catch the adults with yellow sticky traps. If that isn’t enough, Bacillus thuringiensis israelensis (Bti) and Steinernema feltiae nematodes, mixed into the water you pour on, deal with the larvae.

Updated 12 October 2026. How we write these pages

What works against fungus gnats in soil

Letting the surface dry out

Yes, first of all

Eggs and larvae need damp soil. Water only when the top few centimetres are dry, and empty the saucer.

Yellow sticky traps

Yes, for the adults

Stuck into the pot, they catch the gnats that fly and show you how many there are. The larvae in the soil stay put, though, so traps alone aren’t enough.

Spraying insecticide on the plant

Usually not

An adult gnat is short-lived, and most of its life is spent in the soil as a larva. Indoors, it pays to go after the larvae.

If the fungus gnats don’t go away

Bti

Bacillus thuringiensis israelensis.

You mix it into water and water it in. It only affects the larvae of gnats and mosquitoes, and needs repeating about every five days. The Bacillus sold for caterpillars is a different one and won’t work here.

Nematodes

Steinernema feltiae.

Microscopic worms that hunt the larvae in the soil. They’re sold alive and watered in straight away, into damp soil, at roughly 16 to 32 °C.

Fresh soil

Repot and throw the old soil out.

Use a potting mix made for houseplants. Put the old soil on the compost heap rather than in another pot.

Questions about fungus gnats

Do fungus gnats harm plants?

The adults don’t: they’re a nuisance, but they don’t damage the plant and they don’t bite. The larvae feed mostly on dead roots and fungi; in large numbers they can damage the roots of seedlings and cuttings. An established plant is rarely harmed.

Fungus gnats vs fruit flies: how do I tell them apart?

Fungus gnats are dark grey, 3⁠–⁠4 millimetres long, with long legs and antennae. They’re weak fliers and stay close to the pots, on the soil or on the window glass. Fruit flies hang around ripe fruit and the food waste bin.

What do fungus gnat larvae look like?

Slender white maggots, slightly see-through, up to 6 millimetres long, with a black head. To check for them, press a piece of raw potato onto the soil cut side down: after a few days, lift it and look underneath.

Why are there gnats in a new bag of potting soil?

Potting soil with organic matter that isn’t fully broken down, or a bag left open, can arrive with eggs and larvae in it. Between uses, close the bag tightly and keep it off the ground.

Do coffee grounds attract fungus gnats?

They can. A layer of grounds keeps the surface of the soil damp, and that’s where fungus gnats lay their eggs.

Read next

Every plant has its own rhythm. LINFA keeps track for you.

Every day you see which plants to check and why: you feel the soil and water it when it’s dry, not before.

Coming soon to Android
Download on the App Store
LINFA’s main screen: today’s watering round and the calendar