Fungus gnats are the tiny black flies that hover around houseplants, and they are the most common indoor plant pest — and one of the most annoying. The adults are harmless, but their larvae live in the soil and eat the fine roots and organic matter, which can damage seedlings and weaken young plants. The good news is that fungus gnats are a symptom of wet soil, and the cure is mostly about watering less. Get the watering right, and the gnats usually go away on their own.

This guide covers how to identify fungus gnats, what damage they cause, how they live, and how to control them organically.

Identifying fungus gnats

Fungus gnats are small, dark, mosquito-like flies, about 2–3 mm long, with long legs and antennae. They are weak fliers, and they hover around the soil surface of potted plants, especially when the plant is disturbed. They are most often seen in the evening, flying in small clouds around a plant.

Look for:

  • Tiny black flies hovering around the soil of houseplants, especially when you water or move the pot
  • Small, white, worm-like larvae with black heads in the top few centimetres of soil — visible if you scrape the surface
  • Seedlings that wilt, yellow or die for no obvious reason
  • Young plants that grow slowly or look weak, despite adequate light and water

Fungus gnats are sometimes confused with other flies. Fruit flies are rounder, browner and attracted to fruit, not soil. Shore flies are also found around wet soil, but they are stronger fliers and do not damage roots. If the flies are small, black and hovering around the soil of a houseplant, they are almost certainly fungus gnats. If you are unsure, our pest identifier helper can help you work through the symptoms, and your local extension service can confirm an identification.

The fungus gnat lifecycle

The lifecycle starts with the adult female, which lays tiny eggs on the surface of damp soil. The eggs hatch in a few days into small, white, worm-like larvae with black heads, which live in the top few centimetres of soil and feed on fungi, organic matter and fine roots. The larvae feed for one to two weeks, then pupate in the soil and emerge as adults a few days later.

In warm indoor conditions, the whole cycle can take as little as three to four weeks, and there may be several overlapping generations at once — eggs, larvae, pupae and adults all present in the same pot. That is why a single treatment rarely solves the problem: it may kill the adults but leave the eggs and larvae in the soil, and a new generation appears within days.

Fungus gnats need damp soil to breed. They are worst in winter, when plants are watered too often and the soil stays wet, and in pots with poor drainage or with a layer of organic matter on the surface. In a pot that dries out between waterings, they cannot breed.

Damage signs

The adults do not damage plants — they do not bite, and they do not eat leaves. The damage is done by the larvae, which eat the fine root hairs and organic matter in the soil. On a mature houseplant, a small number of larvae causes no noticeable damage. On seedlings and young plants, the larvae can eat enough roots to stunt growth, cause wilting and yellowing, and in a bad infestation, kill the plant.

The signs are often mistaken for overwatering — wilting, yellowing, slow growth — because the two problems go together. If a plant is wilting despite wet soil, and there are small black flies around the pot, the larvae are likely part of the problem. The flies themselves are the most obvious sign, and the most annoying: they are harmless, but nobody wants a cloud of flies in the living room.

Organic-first control, in order

Work through these steps in order, starting with the simplest and most effective: let the soil dry out.

1. Inspect and confirm. Check the soil surface for larvae — scrape the top centimetre and look for tiny white worms with black heads — and watch for the adult flies. Confirm that the problem is fungus gnats and not another pest before you treat.

2. Let the soil dry out. This is the single most effective control. Allow the top 2–3 cm of soil to dry out between waterings, and water less often. Most houseplants prefer this anyway — overwatering is the commonest cause of houseplant death. Water from the bottom, or water thoroughly and then let the pot drain completely, so the surface dries. Do not leave pots standing in water. Within a few weeks of drier soil, the gnat population usually collapses, because the females cannot lay eggs in dry soil and the larvae die.

3. Remove the top layer of soil. Scrape off the top 2–3 cm of soil, where the eggs and larvae live, and replace it with fresh, dry potting mix. This removes a whole generation at once. Do this for every affected plant.

4. Use yellow sticky traps. Yellow sticky cards, placed just above the soil, catch adult gnats, reduce numbers and show you how bad the problem is. They catch adults but not the larvae, so they are a monitoring and reduction tool, not a complete control on their own.

5. Top-dress with a dry barrier. A layer of fine gravel, coarse sand or horticultural grit on the surface of the soil keeps the surface dry and makes it harder for the female gnats to lay eggs. It also looks tidy. A layer of 1–2 cm is enough.

6. Encourage predators and use biological control. Beneficial nematodes — microscopic worms that parasitise soil pests — can be watered into the soil and are highly effective against fungus gnat larvae. They are available from garden suppliers, work best in warm, moist soil, and are harmless to plants, people and pets. The bacterium Bacillus thuringiensis israelensis (Bti), sold as a mosquito control, is also effective against fungus gnat larvae when watered into the soil, and it is harmless to plants, people and pets.

7. Least-toxic sprays, last. If the steps above have not brought numbers down, insecticidal soap can be used on the soil surface, though it is only partly effective. Avoid broad-spectrum insecticides indoors — they are unnecessary, they kill beneficial insects, and they are not safe to use around people and pets in a living space. Always read and follow the label, and use only products approved for indoor use in your area.

If you are unsure which product is appropriate, check your local extension service for recommendations in your area.

Prevention

Prevention is mostly about watering and potting mix. Water only when the top few centimetres of soil are dry — use your finger to check, not a schedule — and always let pots drain completely. Do not leave pots standing in saucers of water. Use a free-draining potting mix, and make sure every pot has drainage holes.

When you bring a new plant home, check the soil for gnats and isolate it for a week or two before placing it among your other plants. Do not use garden soil in pots — it holds too much water and often contains gnat eggs. Store potting mix in a dry place, and do not use a bag that has been left open and damp.

Repot plants that are in old, compacted, waterlogged compost, and remove dead leaves from the soil surface, where fungi grow and gnats breed. For more on houseplant care, see our guides to aloe vera and fiddle-leaf fig.

When is it a serious problem vs cosmetic?

A few gnats around a mature houseplant are cosmetic — annoying, but harmless to the plant. Let the soil dry out, put up a sticky trap, and they will usually disappear. It becomes a serious problem when seedlings or young plants are wilting and dying, when the infestation is heavy and spreading to many pots, or when the flies are so numerous that they are a nuisance in the living space. In that case, act quickly: dry the soil, scrape off the top layer, and consider nematodes or Bti.

Fungus gnats on a single mature plant are a nuisance. Fungus gnats killing a tray of seedlings, or infesting every pot in a collection, are a serious problem. The difference is the age of the plants, the number of flies and the rate of spread — and weekly inspection is how you tell which one you have.

Frequently asked questions

Do fungus gnats bite people? No. They do not bite people or pets and are not poisonous. They are a plant problem and a nuisance, not a health problem.

Will fungus gnats go away on their own? Often, yes — if you let the soil dry out between waterings. The females cannot lay eggs in dry soil, and the larvae die. If the soil stays wet, they will keep breeding.

Can I use washing-up liquid on fungus gnats? It is sometimes recommended as a home remedy, but washing-up liquid is not formulated for plants and can damage roots. Letting the soil dry out, and using nematodes or Bti if needed, are safer and more reliable.

Are fungus gnats the same as fruit flies? No. Fruit flies are rounder and browner, and they are attracted to fruit and fermenting food, not soil. Fungus gnats are smaller, blacker and hover around the soil of potted plants.

How do I stop fungus gnats coming back? Water less, let the soil dry between waterings, use a free-draining mix, and check new plants before bringing them home. The gnats are a symptom of wet soil — fix the watering, and they stay away.

The bottom line

Fungus gnats are a symptom of wet soil, and the cure is mostly about watering: let the top few centimetres dry out between waterings, remove the top layer of soil, use sticky traps to catch the adults, and reach for nematodes or Bti only if the gnats persist. For more pest guidance, see the guides hub and the garden tools.