The tiny flies hovering around your houseplants are almost certainly fungus gnats, and they’re there because the soil is staying too moist. Fungus gnats are drawn to damp potting mix rich in decaying organic matter, where females lay up to 200 eggs at a time in cracks and crevices on the soil surface. The good news: they’re one of the easier houseplant pests to eliminate once you understand what’s fueling the cycle.
What Fungus Gnats Actually Are
Fungus gnats are dark, delicate flies that look like tiny mosquitoes, roughly 1/16 to 1/8 inch long. They have slender legs, segmented antennae longer than their heads, and light gray to clear wings. They’re weak fliers, so they tend to stay close to the pot rather than buzzing around your kitchen. You’ll often see them running across the soil surface, resting on leaves, or drifting toward nearby windows since they’re attracted to light.
People sometimes confuse them with fruit flies, but the two are easy to tell apart. Fruit flies are rounder, tan or brownish, and cluster around ripe fruit or drains. Fungus gnats are darker, narrower, and stay near the soil. If the flies are hovering right above your potted plants or scattering when you water, you’re dealing with fungus gnats.
Why Your Soil Is Attracting Them
Overwatering is the single biggest cause. Fungus gnat larvae feed on decaying organic matter and fungi that thrive in consistently moist soil. When you water too frequently, or your pot doesn’t drain well, the top layer of soil stays wet, creating the perfect environment for both feeding and egg-laying. A female can deposit her eggs in clusters right on that damp surface, and within days a new generation of larvae is working through the soil.
Several factors make the problem worse. Pots without drainage holes trap excess water. Peat-heavy potting mixes hold moisture longer. Compost or bark in the soil provides extra organic material for larvae to eat. Even a bag of potting soil stored in a damp garage can harbor fungus gnat eggs before you ever bring it inside. If you’ve recently repotted a plant or brought a new one home from a nursery, that’s often when an infestation starts.
Can They Hurt Your Plants?
For most healthy, established houseplants, fungus gnats are more annoying than dangerous. The adults don’t bite or feed on plant tissue at all. The larvae live in the soil and primarily eat decomposing organic matter and fungi, not living roots. However, in large numbers, larvae can damage fine feeder roots, especially in seedlings, young cuttings, and small or already stressed plants. If you notice unexplained wilting, yellowing, or poor growth alongside a persistent gnat problem, root damage from larvae is a real possibility.
How to Stop the Cycle
The core strategy is simple: dry out the soil surface. Fungus gnats need that top layer of moist soil to lay eggs, and larvae need moisture to survive. Let the top inch of soil dry completely between waterings. For many houseplants, this is actually healthier watering practice anyway.
You can also switch to bottom watering. Place the pot in a saucer of water and let the soil wick moisture up from below. The roots get what they need while the surface stays dry and inhospitable to egg-laying. Another option is covering the soil with a half-inch to one-inch layer of coarse sand or fine gravel, which dries quickly and creates a physical barrier that discourages females from laying eggs.
Trapping the Adults
Yellow sticky traps placed near the soil surface catch adult gnats before they can reproduce. These won’t solve the problem on their own since the larvae are still developing underground, but they reduce the breeding population and help you gauge how bad the infestation is. When you stop catching new adults, you know you’re winning.
Killing Larvae in the Soil
A hydrogen peroxide soil drench is one of the most popular home treatments. Mix one part standard 3% hydrogen peroxide with four parts water and pour it over the soil as you would normally water. The solution fizzes on contact with larvae and kills them without harming plant roots. Let the soil dry out afterward before watering again.
For persistent infestations, beneficial nematodes offer a biological solution. A species called Steinernema feltiae is commonly sold for exactly this purpose. These microscopic organisms are mixed into water and applied as a soil drench. They enter fungus gnat larvae through body openings, release bacteria that kill the larvae within one to two days, then reproduce and seek out more hosts. Water the soil the day before applying nematodes, since they need moisture to move through the growing media. You can order them online, and a single application often handles a heavy infestation.
Preventing Them From Coming Back
Once you’ve cleared an infestation, prevention comes down to moisture management. Water only when the top inch of soil is dry to the touch. Make sure every pot has adequate drainage. Empty saucers 30 minutes after watering so pots aren’t sitting in standing water. When you buy new potting soil, store it sealed and dry. And when you bring a new plant home, inspect the soil surface for tiny flies or larvae before placing it near your other plants.
Removing dead leaves and other organic debris from the soil surface also helps, since that material holds moisture and gives larvae something to feed on. If you use a soil mix heavy in peat or compost, consider blending in perlite or coarse sand to improve drainage and reduce the moisture-holding capacity of the top layer. Small changes in how you water and what your soil is made of make a surprisingly large difference in whether fungus gnats can establish themselves.