Skip to content
xyléa
Guide · Pests

Fungus gnats in the soil: how to get rid of them for good

Tiny black flies take off every time you water? They're fungus gnats, and they're almost always a sign of soil that stays too wet. The good news: you can get rid of them without insecticide.

Updated on 9 October 2026

In short

  • These tiny black flies are fungus gnats: their larvae live in damp soil.
  • They're mostly a nuisance, but their larvae can damage the roots of young plants and cuttings.
  • The number one fix: let the top of the soil dry out between waterings.
  • Yellow sticky traps for the adults, and Bti or nematodes for the larvae if that's not enough.
  • Allow three to four weeks to get rid of them: the time it takes to break their cycle.

What are these little flies?

They're fungus gnats, tiny black flies about 2–3 mm long, which flutter lazily around pots and take off when you water. Nothing to do with the fruit flies circling the fruit bowl.

The adults live a few days and don't bite. The real issue is their larvae: small white worms with a black head, living in the top inch or two of damp soil and feeding on organic matter. On a mature plant they do little harm; on a seedling or a cutting, they can nibble the young roots.

Why me?

Almost always because the soil stays wet for too long: watering too often, especially in winter, or water sitting in the outer pot. They also arrive with a bag of potting mix or a new plant: keep your bags of potting mix tightly closed, somewhere dry.

Step 1: dry out the soil

It's the most effective fix, and it's free. The larvae need moisture: let the top 1–1.5 in (3–4 cm) of soil dry out between waterings. Most houseplants cope very well with this; check the rhythm on their care guide.

  • Water from below: let the pot soak for 20 minutes in a saucer of water. The roots drink, the top stays dry.
  • Always empty the saucer and outer pot after watering.
  • You can cover the soil with half an inch (1 cm) of sand or fine gravel: the females can no longer lay their eggs.

Step 2: trap the adults

Yellow sticky traps, sold in garden centres, are pushed into the pot. The gnats are drawn to the colour and get stuck. They don't solve the problem on their own, since the larvae stay in the soil, but they stop adults from laying eggs and show you whether the infestation is shrinking.

Step 3: tackle the larvae

If drying out isn't enough, there are two biological solutions, safe for you and your pets:

  • Bti (Bacillus thuringiensis israelensis): a bacterium that only attacks the larvae of gnats and mosquitoes. You'll find it in garden centres, to dilute in your watering can following the label. The treatment usually needs repeating once or twice.
  • Nematodes (Steinernema feltiae): microscopic worms that parasitise the larvae. They're sold in garden centres or online, to use soon after delivery, in damp soil and a room that isn't cold.

In extreme cases, repotting the plant in fresh potting mix, removing as much of the old soil as possible, gives it a clean start. The repotting guide explains how.

Remedies that work less well

Cinnamon, matches pushed into the soil, garlic: these tips get shared a lot, but there's no real evidence they work. As for insecticides, they have no place in a home: the solutions above are enough.

And once the gnats are gone, keep the habit of letting the top of the soil dry out: that's what will stop them coming back. The watering guide will help you find the right rhythm.

This advice is for houseplants in a temperate climate. Every home is different: trust your plant too, and the soil under your finger.