Houseplant clinic: how do I rid my plants of tiny flies?

<span>A ‘Crispy Wave’ bird’s nest fern.</span><span>Photograph: Alamy</span>
A ‘Crispy Wave’ bird’s nest fern.Photograph: Alamy

What’s the problem?
I have tiny little flies all over my plants.

Diagnosis
Those flies are called fungus gnats, not to be confused with fruit flies. Fungus gnats are attracted to moist soil, where they lay their eggs. Often, they hitch a ride into your home through store-bought potting soil or new plants. Plants that favour constant damp soil, such as ferns, are most at risk.

Prescription
First, remove infected plants from the rest of your collection. Then tackle the moisture. Allow the top inch of soil to dry between waterings, as fungus gnats thrive in wet environments. You can also use a sticky trap nearby to capture adult gnats and break their life cycle. For persistent infestations, introduce beneficial nematodes. These are microscopic, soil-dwelling organisms that target and kill fungus gnat larvae without harming your plants. Another option is to use a natural soil drench with neem oil.

Prevention
Cover the top layer of soil with decorative stones or sand; this creates a barrier that prevents fungus gnats from laying eggs. Also, water plants from the bottom, by filling a saucer, to reduce moisture in the surface of the soil.

Got a plant dilemma? Email saturday@theguardian.com with ‘Houseplant clinic’ in the subject line