The tiny flies hovering around your houseplants are almost certainly fungus gnats, and the key to getting rid of them is targeting the larvae living in your soil, not just the adults you see flying around. The adults are mostly a nuisance. They don’t feed on your plants. It’s their larvae, hiding in the top layer of moist soil, that feed on organic matter, fungi, and sometimes your plant’s roots. Here’s how to eliminate them at every stage.
Why Watering Less Is the First Step
Fungus gnats lay eggs in moist soil rich in organic matter. If the top inch or two of your potting mix stays consistently damp, it’s an ideal breeding ground. The single most effective thing you can do is let the soil dry out between waterings. Allow at least the top one to two inches to become fully dry before watering again. This alone can break the breeding cycle, because gnat eggs and young larvae can’t survive in dry conditions.
Bottom watering is a useful technique here. Instead of pouring water over the top of the soil, place your pot in a saucer or tray of water and let the roots draw moisture up from below. The surface stays dry while the root zone stays hydrated, which gives your plant what it needs while making the topsoil inhospitable to gnats.
Kill Larvae With a Hydrogen Peroxide Drench
For a quick, accessible treatment, mix one part standard 3% hydrogen peroxide with four parts water and pour it directly over the soil as you would normally water. The solution fizzes on contact with the soil, killing gnat larvae without harming your plant’s roots. You’ll likely see bubbling at the surface, which is normal. One or two applications, spaced a week apart, typically handles a moderate infestation. Let the soil dry between treatments.
BTI: The Most Targeted Biological Treatment
If hydrogen peroxide doesn’t fully solve the problem, a naturally occurring soil bacterium sold as BTI is the most targeted option. It produces a protein that’s toxic specifically to gnat larvae when they ingest it but completely harmless to plants, pets, and people. You can find it sold as granules (often marketed as “mosquito bits” or “mosquito dunks”) or as a powder.
To use BTI powder, mix one to three teaspoons per gallon of water and use it to water your plants. For heavy infestations, bump that up to four or five teaspoons per gallon. You can also soak granules in water overnight and use the resulting liquid as a soil drench. Because BTI only kills active larvae, you’ll want to repeat treatments every time you water for two to three weeks. This covers multiple generations and ensures newly hatched larvae encounter the bacterium before they mature into adults.
Beneficial Nematodes for Persistent Problems
For stubborn infestations, especially across many plants, microscopic worms called beneficial nematodes are highly effective. The species to look for is Steinernema feltiae. These nematodes actively hunt gnat larvae in the soil, entering and killing them. They’re sold online and at some garden centers, shipped alive in a refrigerated package.
To apply them, mix the nematodes into water following the package directions and water your plants as usual. A few important details make the difference between success and failure: soil temperature needs to be between 55°F and 85°F, which most indoor environments easily meet. Apply in the evening or away from direct sunlight, since UV light kills nematodes quickly. Keep the soil consistently moist for at least two weeks after application so the nematodes can move through the soil and find larvae. Agitate the watering container every five minutes or so while you work, because nematodes sink to the bottom and you want an even distribution.
Neem Oil as a Soil Drench
Neem oil contains a compound that disrupts insect growth and feeding. When used as a soil drench rather than a foliar spray, the plant absorbs it through its roots and distributes it throughout its tissue. Larvae that feed on treated roots ingest the compound and stop developing. Mix neem oil with water according to the product label (typically a few drops of dish soap help it emulsify) and water your plants with the solution. For active infestations, apply weekly. For prevention after you’ve cleared an infestation, every three weeks is sufficient.
Yellow Sticky Traps Catch Adults
Sticky traps won’t solve a gnat problem on their own, but they’re a valuable part of the strategy. Bright yellow cards coated with adhesive attract and capture adult gnats, reducing the number of egg-laying females and giving you a visual gauge of how bad the infestation is. Place traps horizontally near the soil surface or stick them into the pot on a small stake with the bottom edge at canopy height. Check them once or twice a week. If you’re seeing fewer gnats on the traps over time, your soil treatments are working.
Think of sticky traps as monitoring tools more than a cure. They capture flying adults, but the adults don’t damage your plants. The real action is happening in the soil. Still, pulling dozens of adults out of the air each day means fewer eggs being laid, which speeds up the process.
A Sand or Gravel Top Layer
Adding a half-inch to one-inch layer of coarse sand, perlite, or decorative gravel on top of your potting mix creates a physical barrier. Adult gnats need moist organic material to lay eggs in. A dry, inorganic top layer discourages them from landing and laying eggs in the first place. This works best as a preventive measure or combined with the soil treatments above, not as a standalone fix for an active infestation where larvae are already established below the surface.
Putting It All Together
The most effective approach combines several of these methods. Start by letting the soil dry out and placing yellow sticky traps near your plants so you can monitor the situation. Then apply a hydrogen peroxide drench or BTI treatment to kill existing larvae. Add a sand top layer to prevent new eggs from being laid. Repeat soil treatments for two to three weeks to cover the full gnat life cycle, since new adults may keep emerging from pupae already in the soil even after you’ve killed the active larvae.
For most indoor plant collections, this combination clears the problem within three to four weeks. If you’re dealing with dozens of plants or a recurring issue, beneficial nematodes offer the most thorough long-term solution because they actively seek out larvae rather than waiting for larvae to encounter a treated surface. Whatever approach you choose, reducing soil moisture is non-negotiable. Every other treatment works better when the soil isn’t a welcoming environment for the next generation of gnats.