What fungus gnats are
Fungus gnats are small, dark, weak-flying insects that hover around potting soil. The adults are mostly a nuisance. Their larvae live in the top layer of moist soil, feeding on fungi and organic matter, and in large numbers can nibble fine roots of seedlings and young plants.
Why you have them
Almost always, the cause is soil that stays damp. Wet potting mix is the perfect nursery for their eggs. New plants and bags of potting mix can also bring them in.
Step 1: let the soil dry
Allow the top few centimeters (an inch or two) of soil to dry out before watering again. This makes the surface unsuitable for eggs and larvae. For plants that tolerate it, bottom watering (letting the pot soak up water from a tray for 20–30 minutes) keeps the surface drier.
Step 2: trap the adults
Yellow sticky traps placed just above the soil catch flying adults and help you track progress. Fewer gnats on the traps each week means it's working.
Step 3: deal with the larvae
- Replace the top layer of soil with fresh, dry mix, or cover it with a thin layer of coarse sand or fine grit.
- Biological larvicides based on Bacillus thuringiensis subspecies israelensis (often sold as mosquito bits or dunks) are widely used against fungus gnat larvae. Follow the product label.
- Beneficial nematodes (Steinernema feltiae) are another option sold for fungus gnat control.
Step 4: keep them from coming back
Gnats often arrive in a bag of potting mix that was left open, so keep bags sealed and dry. Give new plants a couple of weeks on their own before they join the others, empty saucers after watering, and pick fallen leaves off the soil surface.
Because the life cycle takes a few weeks, expect to keep this up for about a month before the gnats are gone.
More reading: all articles.