Those tiny flies hovering around your houseplants are almost certainly fungus gnats, and the key to eliminating them is targeting the larvae living in your soil, not just the adults you see flying around. The adults are mostly a nuisance, but their larvae feed on organic matter and plant roots in moist potting mix, and a single female can lay 100 to 200 eggs at a time. Getting rid of them takes a combination of drying out the soil, trapping adults, and killing larvae over a period of three to four weeks.
Identifying What’s in Your Plants
Fungus gnats are by far the most common small fly in houseplants. The adults are about 1/8 inch long, mosquito-shaped, with long legs, long antennae, and clear wings. They’re weak fliers. You’ll often see them resting on the soil surface, running across leaves, or lazily drifting up when you water. Their larvae are white, legless, about 1/4 inch long, and have a distinctive shiny black head capsule. You might spot them if you dig into the top layer of damp soil.
A less common lookalike is the shore fly, which has a stockier body, very short antennae, and five light-colored spots on each dark wing. Shore flies are faster, stronger fliers. If your flies match that description, the control methods below still help, but shore flies are more attracted to algae on soil surfaces than to the organic matter fungus gnats prefer.
Why They Keep Coming Back
Fungus gnats reproduce fast. Eggs hatch in four to six days. The larvae feed in the soil for about 15 days, then pupate for five to six days before emerging as adults ready to mate and lay another round of eggs. That means a new generation can complete its entire life cycle in roughly a month, and multiple generations can overlap in the same pot. If you only kill the adults, the larvae already in the soil will keep producing new waves of flies. That’s why every effective strategy works from the soil up.
Step 1: Let the Soil Dry Out
The single most important thing you can do is let the top inch of soil dry out completely between waterings. Fungus gnat eggs and young larvae need moist organic material to survive. Dry surface soil eliminates favorable egg-laying sites and kills off early-stage larvae before they can develop. For most houseplants, this slight shift in watering habits won’t cause any harm. Plants that need consistently moist soil (like ferns or calatheas) are trickier, but even with those, you can let the very top layer dry slightly between waterings.
Bottom watering is another useful tactic. Instead of pouring water over the top of the soil, set your pot in a saucer of water and let the plant absorb moisture from below. The surface stays dry while the roots still get what they need.
Step 2: Trap the Adults
Yellow sticky traps won’t solve the problem on their own, but they’re an important piece of the puzzle. The bright yellow color attracts fungus gnats, and the adhesive surface catches them before they can lay more eggs. Stake one trap at the base of each infested plant, right at soil level where the gnats tend to congregate. Most traps come with a pointed end you can push directly into the soil. If the soil is compacted, use a butter knife to make a small hole first.
Sticky traps also serve as a monitoring tool. Check them every few days. If you’re catching dozens of gnats, the infestation is active and you need to stay aggressive with the other methods. Once the traps come up mostly clean for a week or two, you’re winning.
Step 3: Kill Larvae in the Soil
While drying and trapping handle the adults and prevent new eggs, you still need to deal with larvae already living in the potting mix. Several methods work well.
Hydrogen Peroxide Drench
Mix one part standard 3% hydrogen peroxide (the kind sold at drugstores) with four parts water. Pour it directly over the soil as you would a normal watering. The solution fizzes on contact with organic material and kills larvae without harming plant roots. You may see some bubbling at the soil surface. Repeat this with your next one or two waterings.
Beneficial Nematodes
For a more targeted biological approach, microscopic nematodes (specifically a species called Steinernema feltiae, sold at many garden centers and online) are highly effective. These tiny organisms 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. You apply them as a soil drench. Water the soil the day before so it’s moist, since nematodes need moisture to move through the growing media. Apply in the evening or on a cloudy day, and keep soil temperatures between 60 and 70°F for best results. They won’t survive if soil gets above 95°F for more than a few hours.
Sand or Vermiculite Top Dressing
A physical barrier on the soil surface can prevent adults from laying eggs entirely. Spread a 1/4-inch layer of coarse sand or fine vermiculite on top of the potting mix. Fungus gnats can’t deposit eggs deeper than about 1/16 of an inch, and they won’t lay eggs in inert materials like sand or vermiculite. This layer also helps the soil surface dry out faster. If you’re starting seeds, seedlings will push through the sand without any issues.
How Long It Takes to Work
Expect three to four weeks of consistent effort before fungus gnats are fully under control. That timeline matches the life cycle: you need to outlast the larvae already developing in the soil and prevent any new eggs from being laid. The first week, you’ll likely still see adults emerging from pupae that were already in the soil before you started treatment. By week two, the numbers should drop noticeably. By week three or four, the sticky traps should be mostly clean.
If you’re still seeing heavy gnat activity after a month, consider repotting the plant entirely. Remove as much of the old soil as possible, trim any mushy or damaged roots, and repot into fresh, well-draining potting mix. This eliminates the larval population in one move.
Preventing Them From Coming Back
Most fungus gnat infestations start the same way: bagged potting soil that already contains eggs or larvae, or overwatering that creates the perfect breeding environment. A few habits make reinfestation much less likely.
- Water only when needed. Check the top inch of soil with your finger before watering. If it’s still damp, wait.
- Use well-draining soil. Adding perlite or coarse sand to your potting mix improves drainage and keeps the surface drier.
- Inspect new plants. Quarantine new purchases for a week or two before placing them near your other plants. Check the soil surface for tiny flies or larvae.
- Store potting soil sealed. Open bags of potting mix left in warm, humid spaces become breeding grounds. Keep bags tightly closed or transfer soil to a sealed container.
- Empty saucers promptly. Standing water in drip trays keeps the bottom of the pot saturated and encourages gnat activity.