Fungus gnats in a terrarium: causes and solutions
Identify the gnats that live in the compost, reduce the conditions that favour them and protect both the plants and the microfauna of your terrarium.

In this guide
Small flies around a terrarium are often fungus gnats, which are associated with damp substrates. They do need identifying before you treat anything. A few adults do not mean that every plant is at risk: their presence is mainly an invitation to look at the soil and at any decaying matter.
Recognising your visitors
Fungus gnats look like small dark flies that run across the compost and fly near the jar. Their larvae can be translucent with a dark head. A close-up photograph helps you tell these insects apart from other small flies.
Springtails, by contrast, have no wings; many of them jump when disturbed. They are not treated as a gnat infestation. Do not identify a species from the simple fact that a small organism is white.
Why do they turn up?
A new plant, or the compost it came in, can bring in eggs or larvae. A substrate that stays saturated, along with soft debris, then helps them settle. Pots standing nearby can keep the problem going even after you have cleaned the jar.
The adults are mainly a nuisance. Some larvae can damage young roots and cuttings, but a plant in decline should also prompt you to look for excess water. Read why terrarium plants die so as not to mistake a symptom for a cause.
Act step by step
Correct the conditions
Take out debris that is decaying in excess and stop watering if the substrate is still damp. Reduce the saturation without drying out the mosses and tropical plants completely. See watering a terrarium to adjust what you add.
Keep an eye on the adults
A sticky trap placed nearby, out of reach of the microfauna and of any animals, can help you follow the adults. It does not remove the larvae from the soil and it may catch other insects: use it sparingly, and not as proof that the problem is solved.
Check anything new you bring in
Keep recently bought plants apart for a while and inspect the root ball before planting them. Keep bags of substrate closed. Note how the adult numbers change over several observations: one day without a single gnat is not enough.
What if the problem continues?
A badly affected plant may need to come out of the jar and be repotted in a suitable substrate. For targeted biological control, ask a specialist: compatibility with the organisms already there and the conditions of use both matter. Do not add a product at random to a closed system.
Avoid recipes based on vinegar, essential oils or household insecticide poured onto the soil. They are not a reliable protocol for a planted ecosystem. The bioactive maintenance guide helps you protect the decomposers you want to keep.
If the mix itself has broken down, compare the terrarium substrates before a targeted rebuild; buying equipment is no substitute for correcting the moisture.
Sources
Royal Horticultural Society: fungus gnats and how to manage them
Frequently asked questions
Do springtails eat all the gnats?
No. They take part in decomposition, but they are not a guaranteed answer to the eggs, larvae or adults of fungus gnats.
Should you throw the whole terrarium away?
Not straight away. Identify the organisms, correct the saturation and inspect the plants. Replacing one badly affected root ball may be enough.




















