Those small, mosquito-like flies hovering around your houseplants are almost always fungus gnats. They’re mostly harmless to you, but their larvae feed on organic matter and fine roots in damp soil, which can weaken plants over time — and once they’ve established themselves, they multiply fast.

Why They Showed Up in the First Place
Fungus gnats are drawn to consistently moist soil — it’s where they lay eggs and where larvae feed. If you’ve been watering on a fixed schedule rather than checking the soil first, or using a pot without good drainage, that’s usually the root cause (no pun intended).
Step 1: Let the Soil Dry Out Significantly
This is the single most effective change you can make. Fungus gnat eggs and larvae need moist soil to survive. Let the top 1–2 inches of soil dry out completely between waterings — most houseplants tolerate this better than people expect, and it breaks the gnat life cycle at the source.
Step 2: Set Up Yellow Sticky Traps
Small yellow sticky cards (on stakes, pushed into the soil) attract and trap adult gnats, interrupting their ability to lay more eggs. This won’t solve the underlying moisture problem, but it’s an easy way to reduce the visible adult population while you fix the soil.

Step 3: Apply a Layer of Sand or Diatomaceous Earth
Spreading a thin layer (about a quarter-inch) of coarse sand, or food-grade diatomaceous earth, over the top of the soil creates a dry barrier. Adult gnats can’t lay eggs effectively through it, and it also dries out faster than bare soil.
Step 4: Use a Hydrogen Peroxide Soil Drench (For Active Larvae)
If you already have larvae in the soil, mix 1 part 3% hydrogen peroxide with 4 parts water, and water your plant with this mixture instead of plain water. It fizzes on contact with the soil — that’s the peroxide killing larvae on contact — and breaks down into plain water and oxygen shortly after, so it won’t harm the plant.

Step 5: Repot If the Infestation Is Severe
For a heavy, ongoing infestation that doesn’t respond to the steps above, removing the plant, shaking off as much of the old soil as possible, and repotting into fresh, dry potting mix resets the environment completely.
Preventing Them From Coming Back
- Always check soil moisture with your finger before watering, rather than following a fixed schedule
- Use pots with drainage holes, and empty any standing water in saucers
- Avoid overwatering “just to be safe” — most houseplant deaths come from overwatering, not underwatering, and gnats are a direct symptom of consistently wet soil
FAQ Section
Are fungus gnats harmful to my plants? The adults are mostly a nuisance, but larvae feeding on fine roots can weaken young or already-stressed plants over time. Established, healthy plants usually tolerate a mild infestation without serious damage.
How long does it take to get rid of them completely? With consistent dry-soil watering and sticky traps, most infestations clear up within 2–4 weeks, since you’re interrupting their breeding cycle rather than just killing visible adults.
Can I use regular dish soap spray instead of hydrogen peroxide? A diluted dish soap spray can help with adult gnats on the soil surface, but it doesn’t penetrate the soil to address larvae the way a hydrogen peroxide drench does.
Will letting the soil dry out hurt my plant? For most common houseplants, allowing the top inch or two to dry between waterings is actually healthier than keeping soil constantly moist — check your specific plant’s needs, but this is rarely an issue for typical indoor plants.