What Causes Fungus Gnats in Your House?

Fungus gnats show up in your house because their larvae need moist organic matter to survive, and indoor potting soil is the perfect source. Those tiny, dark flies hovering around your houseplants aren’t coming from outside. They’re breeding in the wet soil of your pots, feeding on fungi and decaying material right beneath the surface.

Moist Potting Soil Is the Primary Cause

Nearly every indoor fungus gnat problem traces back to one thing: overwatered houseplants. Female fungus gnats lay their eggs in the top layer of damp soil, and at room temperature (around 75°F), those eggs hatch in roughly three days. The larvae then feed on fungi, decaying organic matter, and plant roots in the soil for about two weeks before becoming adults and starting the cycle again. A single pot that stays consistently wet can produce multiple overlapping generations.

The critical factor is surface moisture. If the top half-inch of soil stays damp between waterings, it creates ideal conditions for egg-laying and larval survival. Pots without drainage holes, saucers that collect standing water, and dense soil mixes that hold moisture all contribute. The gnats don’t need your whole house to be humid. They just need that thin, wet layer on top of the dirt.

Contaminated Potting Mix

Sometimes the gnats arrive before you even water. Bags of potting soil that contain incompletely composted organic matter are a common entry point. Eggs or larvae can already be living in the mix when you buy it, especially in bags that have been stored outdoors or have small tears. Once you pot a plant with contaminated soil and add water, you’ve given those stowaways exactly what they need to thrive. Using pasteurized potting mix significantly reduces this risk.

What Attracts Them to Specific Plants

Fungus gnats don’t pick plants at random. Adult females are drawn to the microorganisms growing in and on soil. Lab research has shown that fungus gnats are attracted to a wide array of living microorganisms, including common soil fungi and even plant pathogens. They actively prefer to lay eggs near plants that are already hosting certain fungal colonies, which means a plant with root rot or other fungal issues is essentially a magnet for gnats. The relationship goes both ways: gnats can carry fungal spores from plant to plant on their bodies, potentially spreading disease through your collection.

Plants that are already stressed, overwatered, or sitting in old, decomposing soil are more likely to harbor the fungi that attract egg-laying females. This is why a single struggling plant in a room full of healthy ones often becomes the epicenter of an infestation.

How to Tell Them Apart From Fruit Flies

Before you start treating your soil, make sure you’re dealing with the right pest. Fungus gnats and fruit flies are roughly the same size (about 1/8 inch), but they look and behave differently.

  • Fungus gnats are dark gray or black with long, spindly legs and a slender body that resembles a tiny mosquito. They fly weakly and erratically, often hopping just above the soil surface or clinging to nearby windows. Their larvae are translucent white with a shiny black head capsule, and you’ll find them in potting soil.
  • Fruit flies are tan or brown with distinctive bright red eyes and a compact, stout body. They hover in smooth patterns over fruit bowls, wine glasses, and drains. Their larvae are small white maggots without a visible head, found in fermenting produce.
  • Drain flies are fuzzy, dark, moth-like insects that breed in the biofilm inside plumbing. You’ll see them near bathroom or kitchen drains, not near plants.

The simplest test: if the tiny flies are congregating near your houseplants, they’re almost certainly fungus gnats. If they’re in the kitchen near fruit, they’re fruit flies.

What the Larvae Do to Your Plants

Adult fungus gnats are mostly a nuisance. The real damage happens underground. Larvae feed on fine root hairs and young feeder roots, which weakens the plant’s ability to take up water and nutrients. Affected plants wilt, develop yellowing leaves, and may drop foliage even when the soil is moist. In severe infestations, seedlings and small plants can be stunted or killed outright. The larvae can also feed on the developing tissue of freshly propagated cuttings, delaying or preventing rooting.

How to Break the Breeding Cycle

Since fungus gnats depend on moist soil to reproduce, the most effective strategy is to let the top inch or so of soil dry out between waterings. This alone disrupts the cycle because eggs and young larvae can’t survive in dry conditions. For plants that need consistent moisture, bottom watering (filling the saucer and letting the plant absorb water from below) keeps the top layer drier while still hydrating the roots.

A physical barrier on the soil surface also works well. A layer of pebbles or gravel, 10 to 20 millimeters deep (roughly half an inch to three-quarters of an inch), creates a dry barrier that prevents females from reaching the soil to lay eggs. Use gravel in the 3 to 8 millimeter size range. Fine sand is less effective because it tends to wick moisture and compact into a damp crust that gnats can still use.

For active infestations where drying out the soil isn’t enough, a biological larvicide containing Bti (a naturally occurring soil bacterium) is the most targeted option. When watered into the soil, Bti produces proteins that are toxic to gnat larvae but harmless to plants, pets, and people. It works by disrupting the larvae’s digestive system. You’ll typically need to apply it with several consecutive waterings to catch larvae at different stages of development.

Yellow sticky traps placed near the soil surface catch adult gnats and help you monitor whether the population is declining. They won’t solve the problem on their own, since they only capture adults, but they’re useful for gauging how well your other efforts are working.

Preventing Reinfestation

Once you’ve cleared an infestation, a few habits keep gnats from coming back. Water only when the soil surface is dry to the touch. Repot plants in fresh, pasteurized potting mix rather than reusing old soil. Empty saucers within 30 minutes of watering so pots aren’t sitting in standing water. And inspect new plants before bringing them home. A quick look at the soil surface for tiny larvae or adults hovering near the pot can save you weeks of dealing with a new colony spreading through your collection.