Where Do Fungus Gnats Come From and How to Stop Them

Fungus gnats come from moist soil rich in organic matter, where their larvae feed on fungi, decaying plant material, and roots. If you’re suddenly seeing tiny dark flies hovering around your houseplants, they almost certainly arrived in one of two ways: they hitchhiked inside on a new plant or bag of potting soil, or they flew in from outdoor breeding grounds in mulch, compost, or garden beds.

How They Get Into Your Home

The most common source is a new plant from the nursery or garden center. Fungus gnat eggs and larvae are nearly invisible in potting mix, so a perfectly healthy-looking plant can harbor a growing population before you notice a single adult flying around. Penn State Extension recommends turning up the soil near the base of any plant before you buy it and looking for small, glossy larvae or adult gnats near the surface.

Bagged potting soil is another frequent culprit. Mixes that contain bark, peat, or compost provide exactly the decaying organic matter that fungus gnat larvae need. If the bag has been stored outdoors or left open, adults may have already laid eggs in it. Even sealed bags can contain enough organic material to support larvae if moisture levels are high.

The third route is simply through open windows, doors, or gaps around vents. Fungus gnats breed outdoors in any consistently damp spot with decomposing material: garden mulch, leaf litter, compost bins, and soggy areas around foundations. Adults are weak fliers but are drawn to light and moisture, which pulls them indoors, especially in fall when outdoor conditions cool down and you bring potted plants back inside.

What They Actually Are

Fungus gnats are small, dark brown to black flies with long, narrow bodies and spindly legs that look similar to a mosquito’s. They’re often confused with fruit flies, but the two are easy to tell apart. Fruit flies are rounder, tan or brownish-orange, and hover around ripening fruit or drains. Fungus gnats stick close to soil and potted plants, and their flight pattern is more erratic, often zigzagging near the soil surface or window light.

Adults are roughly 1/8 inch long and mostly harmless on their own. They don’t bite, and they don’t eat your plants. The real problem is their larvae, which are translucent, worm-like, and about 1/4 inch long with a distinctive black head capsule. These larvae live in the top layer of soil, feeding on fungi, algae, decaying organic matter, and, when populations are large enough, live root tissue.

Why Overwatering Is the Root Cause

Fungus gnats don’t just prefer moist soil. They depend on it. Research from Clemson University found that larval survival is highest when growing media is kept at a constant moisture level of around 50%. Overly wet or saturated soil creates ideal conditions for reproduction, while also promoting the fungal and algal growth that larvae feed on. In other words, soggy soil gives them both a nursery and a food source at the same time.

This is why fungus gnats seem to appear out of nowhere. A few unnoticed eggs in your potting mix can quietly develop into a full infestation if the soil stays consistently damp. Adult females are specifically attracted to fungi growing on moist soil surfaces, and they lay their eggs right next to that food source so their larvae can start feeding immediately after hatching.

How Fast They Multiply

Fungus gnats reproduce quickly at room temperature. The full life cycle, from egg to adult, takes about four weeks under typical indoor conditions. At warmer temperatures around 75°F, that timeline compresses to as little as 17 days. Here’s what the progression looks like:

  • Eggs: Hatch in 3 to 6 days after being laid in moist soil
  • Larvae: Feed in the soil for 10 to 14 days
  • Pupae: Develop for 4 to 6 days just below the soil surface
  • Adults: Live about 10 days, during which females lay the next round of eggs

Because generations overlap, a single plant pot can contain eggs, larvae, pupae, and adults simultaneously. This is why it often feels like the gnats keep coming back even after you’ve killed the visible adults. The next generation is already developing in the soil.

What They Do to Your Plants

For most healthy houseplants, a small fungus gnat population causes minimal damage. The larvae primarily eat decaying matter and fungi in the soil, not the plant itself. But when populations grow large, or when plants are young and vulnerable, the larvae start feeding on fine root hairs and root tissue. This can cause unexplained wilting, yellowing leaves, and stunted growth, symptoms that look a lot like overwatering (which, of course, is also what caused the gnats in the first place).

Seedlings and freshly propagated cuttings are especially at risk. Larvae feed on the developing callus tissue of new cuttings, which delays or prevents rooting entirely. If you’re propagating plants in soil and noticing poor root development, fungus gnat larvae are worth investigating.

How to Cut Off Their Source

Since moisture is the single biggest factor driving fungus gnat populations, the most effective control is simply watering less frequently. Let the top inch or two of soil dry out completely between waterings. This alone kills larvae and eggs in the upper soil layer and makes the surface unattractive to egg-laying females. Most houseplants tolerate this drying period without any issues.

For plants that need consistently moist soil, bottom watering helps. By adding water to a saucer and letting the plant absorb it from below, you keep the top layer of soil dry, which is the zone where gnats lay eggs and larvae develop. Improving drainage also matters: make sure pots have holes and aren’t sitting in standing water.

Yellow sticky traps placed near the soil surface catch adult gnats and help you monitor whether the population is growing or declining. They won’t solve the problem on their own because they only catch adults, not the larvae in the soil, but they’re useful for gauging how bad things are. A thin layer of coarse sand or decorative pebbles on the soil surface can also deter females from laying eggs, since they need access to moist organic material.

When bringing new plants home, isolating them for a week or two gives you time to spot any gnats before they spread to your other plants. And if you’re opening a new bag of potting mix, storing it sealed and dry until you need it reduces the chance of it becoming a breeding ground on its own.