Drie kamerplanten in potten op een lichte vensterbank

How to get rid of fungus gnats in houseplants

Kevin

In brief

Fungus gnats breed in the potting compost of your houseplants. The eggs are laid in the top layer, and the larvae live there on algae, fungi and dead organic matter. That food is there as long as the compost stays wet.

So to get rid of fungus gnats, let that layer dry out between waterings, and the cycle stops by itself. Allow one full cycle: three to four weeks in summer, longer in cooler conditions.

Yellow sticky traps catch the adult gnats in the meantime, but that doesn't make the problem go away. A fruit fly trap you can leave on the shelf: it lures with fermenting fruit, and fungus gnats aren't interested in that.

On this page
  1. In brief
  2. Is it really a fungus gnat?
  3. Where they come from
  4. How to get rid of fungus gnats: what works
  5. What doesn't work
  6. Frequently asked questions

Is it really a fungus gnat?

This is where most wrong purchases begin, because the wrong trap catches nothing.

On the left a fruit fly with red eyes on an apple, on the right a fungus gnat on potting compost
Left: fruit fly. Yellowish brown, strikingly red eyes, found near fruit.Right: fungus gnat. Dark, slender, long legs, comes out of the potting compost.

Simply look at where they are.

Fungus gnats stay close to plants. A slender, dark body and long legs, one to five millimetres long, and they're poor fliers: mostly short hopping flights over a surface. Water the plant or move the pot, and a little cloud rises up.

Fruit flies stay close to fruit, the bin and the sink. Lighter, yellowish brown, with red eyes you can't miss. They hover purposefully around an apple.

Still unsure? Move a plant to another room for a few days. If the gnats stay there, you know.

Where they come from

Almost always from the pot itself. Fungus gnats develop in very damp places where the soil contains organic matter, and window boxes and plants in potting compost are among them. The eggs are laid in the top layer.

They occur all year round, so in winter too: the heating is on, there's less light, the plant uses less water, and so the compost stays wet for longer. That's exactly what a larva needs.

A female lays a lot of eggs, about a thousand, in groups of two hundred on damp soil. From egg to adult takes twenty to twenty-five days in summer; in cooler conditions the whole cycle stretches to more than six weeks. That's why there are a few at first and dozens a few weeks later.

How to get rid of fungus gnats: what works

Let the top layer dry out

This is the only thing that tackles the source. The Royal Horticultural Society (RHS) notes that fungus gnats are often more numerous in compost that is constantly wet, and that letting it dry can reduce their numbers, as long as the plant doesn't suffer. The Dutch Knowledge and Advisory Centre on Animal Pests (KAD) gives the same advice: less moisture in the soil, no overwatering, and air the compost regularly. Only water when the top two to three centimetres feel dry. Push your finger in, because looking is misleading.

Hand feeling the top layer of potting compost in a houseplant
Feeling works better than looking: dry compost can look dark and wet compost light.

Don't dry the plant out in the process. Ferns and calatheas won't survive that. Water those from below: stand the pot in a bowl of water for a quarter of an hour and keep the top layer dry. The KAD also lists watering via a saucer or a drip feeder as a preventive measure.

Put up yellow sticky traps

Push the cards low into the pot, just above the compost, because that's where they fly. They catch the adults and so take egg-laying out of the equation. The RHS recommends them too: yellow sticky traps placed near the plants.

They don't reach the larvae. Sticky traps on their own are a losing battle: numbers do fall, but a new batch keeps coming as long as the compost stays wet.

What to look for when choosing a sticky trap is explained under fungus gnats.

Put something coarse on top

Two centimetres of sand, fine grit or perlite makes egg-laying difficult. On its own it solves nothing, but together with keeping things drier it makes a noticeable difference.

Nematodes, if it persists

If the problem persists, you can use nematodes that parasitise the larvae; both the KAD and the RHS mention them. Steinernema feltiae is the species used in Dutch greenhouse research; there it proved wise to spread the treatment over a period of six weeks rather than doing it all in one go. Predatory mites are also available for the same purpose. You do have to order them, they have a limited shelf life, and they cost more than a pack of sticky traps.

What doesn't work

The fruit fly trap

It lures with the smell of fermenting fruit, and fungus gnats don't respond to that. That's exactly why we state on our product pages which pest something is meant for.

Just repotting

If you carry on watering the same way, in a month you'll have a wet top layer again, and so larvae again.

Cinnamon on the compost

You come across it everywhere. We haven't found any evidence anywhere that a layer of cinnamon from the spice rack clears up a population. It's cheap, but don't expect too much from it.

A dish with washing-up liquid

That's the fruit fly trick, and even there it only half works. Here it does next to nothing, because fungus gnats aren't attracted to that smell.

Frequently asked questions

How long until I'm rid of them?

Allow one full cycle: three to four weeks in summer, longer when it's cooler. The number of gnats flying around drops sooner, as soon as the sticky traps are up.

Which compost prevents fungus gnats? Do I need to replace the compost?

The honest answer is that we don't know. Lots of sites say it's down to unsterilised or cheap compost and that another brand solves the problem. We haven't found a reliable source for that. What is established is that the larvae develop in very damp compost with decaying organic matter, and that the eggs are laid in the top layer. You control that yourself with how you water, and that works in any compost. The RHS does recommend compost formulated for houseplants for indoor plants, and notes that throwing old compost away rather than reusing it removes the eggs and larvae already in it. But repotting without changing how you water will simply give you a wet top layer again within a month.

How do I use nematodes, and how often?

The dose is on the packaging and differs between suppliers, so check there, not with us. One thing is worth knowing: in Dutch greenhouse research on Steinernema feltiae, it proved better to spread the treatment over a period of six weeks than to apply it all at once. So expect a series of treatments rather than a one-off. And keep the top layer drier as well, otherwise you're only topping up what keeps coming.

Are fungus gnats harmful?

Not to you. They don't bite. Usually not to the plant either: according to the RHS, established plants are unlikely to be damaged. Only with seedlings and soft cuttings can the larvae feed on the fine roots or the base of the stem; that mostly matters when you're raising plants from seed or cuttings.

Do they come from the drain?

They can: a leak or a dirty drain makes just as good a breeding site. But if you see a broader, hairy insect sitting still in an almost triangular shape, that's a drain fly.

Do I need to treat all my plants?

Yes. They're poor fliers, but they do get around. One forgotten wet pot keeps the breeding going.

Lees ook

Back to blog

Where this information comes from

  1. Appearance (1 to 5 mm), the short hopping flights over a surface, that they occur all year round, the larvae's food (algae, fungi, dead organic matter), and watering via a saucer or drip feeder as a preventive measure Kennis- en Adviescentrum Dierplagen (KAD), the Dutch Knowledge and Advisory Centre on Animal Pests, knowledge base Rouwmuggen (Sciaridae), in Dutch, accessed 26 November 2026view the source
  2. The advice to reduce soil moisture, avoid overwatering and air the compost regularly, that control is usually not necessary, and that nematodes and predatory mites can be used against the larvae the same KAD page
  3. That eggs are laid in the surface layer of the compost, that fungus gnats are often more numerous in compost that is constantly wet and that letting it dry can reduce their numbers, yellow sticky traps near the plants, nematodes (Steinernema feltiae) and predatory mites as biological control, that established plants are unlikely to be damaged and that some species feed on seedling roots and the base of soft cuttings, compost formulated for houseplants, and that discarding old compost removes existing eggs and larvae Royal Horticultural Society (RHS), Fungus gnats (sciarid flies), accessed 3 December 2026view the source
  4. Number of eggs, the time from egg to adult, and spreading a nematode treatment over six weeks Wageningen UR Glastuinbouw, Biologische bestrijding van rouwmuggen (report GTB-1303, Pijnakker et al., 2014), in Dutch, accessed 26 November 2026view the source
  5. Not substantiated, and therefore described as unknown in the text that the type or quality of potting compost determines whether you get fungus gnats, and that replacing the compost solves the problem

How we write these pages, and what we do when we cannot back something up, is explained on How our advice pages are made.