Yellow sticky trap in a potted houseplant with a sandy top layer to control fungus gnats

If you see tiny black flies hovering over potting soil or zipping out when you water, you’re likely dealing with fungus gnats. They breed in consistently damp potting mix, and while adult gnats are mostly a nuisance, their larvae feed in the top layer of soil and thrive where moisture lingers. The fix is straightforward: cut off the habitat, break the life cycle, and adjust care so they don’t return. Here’s a clear, step-by-step plan.

Confirm You’re Dealing With Fungus Gnats

Before treating, make sure the pest is truly fungus gnats and not fruit flies or springtails. Correct ID keeps you from wasting effort on the wrong problem.

Simple confirmation tests:

If you’re unsure which plant you’re growing (and how wet its soil should be), you’ll fix and prevent gnats more reliably by first identifying the plant. You can identify a plant from a photo and then tailor watering accordingly.

Immediate Containment: Traps and Quarantine

Start reducing the adult population right away so fewer eggs are laid while you fix the soil. Then isolate the source plants so the problem doesn’t spread.

App Card

Dry the Top 2–3 cm of Soil Fast

Gnat larvae thrive in constantly damp media, especially near the surface. Your first goal is to dry that zone and keep it drier between waterings—without stressing the plant.

If you struggle to judge dryness, our guide on how often to water houseplants explains simple checks by pot size and soil type. You can also use Plantico to set watering reminders tuned to your plant and pot.

Remove and Replace the Infested Top Layer

Physically removing the most infested soil knocks back larvae and eggs immediately and helps your later treatments work better.

  1. Gently scrape off and discard the top 2–3 cm of potting mix. Bag it before carrying it through your home.
  2. Top up with fresh, high-quality potting mix. Avoid compost-heavy blends that hold too much moisture unless the plant specifically needs it.
  3. Add a dry surface barrier 0.5–1 cm deep, such as coarse horticultural sand, pumice, or fine aquarium gravel. These materials dry quickly and are uncomfortable for egg-laying. Avoid dense decorative pebbles that can trap moisture underneath.

After topping, water sparingly from the bottom or at the pot’s edge so the new surface layer dries quickly.

Kill Larvae in the Soil (Safe Options)

Use one of these targeted treatments to finish off larvae in the potting mix. You don’t need harsh chemicals indoors; these options work when you keep the surface dry.

Keep sticky traps in place while you treat. Replace them every few days so you can see whether adult counts are dropping. Avoid pouring dish soap or vinegar into the soil; these can harm roots without solving the larval stage. Skip systemic insecticides indoors unless you have a specific reason and can ventilate well.

Improve Potting Mix, Pots, and Watering Habits

Gnats are a symptom of consistently wet, organic-rich soil. Fine-tune your setup so the top layer dries between waterings.

If your plant’s leaves are yellowing and you’re unsure whether it’s overwatering or something else, see our explainer on why leaves turn yellow for quick diagnosis tips.

When a Full Repot Makes Sense

If gnats persist after two to three weeks of drying the surface and treating larvae, your potting mix may be too water-retentive or broken down. A fresh start can reset moisture and remove lingering eggs and pupae.

  1. Choose a pot just 2–5 cm wider than the current root ball, with large drainage holes.
  2. Tip out the plant and gently loosen and remove the outer layer of old soil. Shake off as much as is easy without tearing healthy roots.
  3. Inspect roots. Trim dead, mushy roots with clean scissors. Healthy roots are firm and pale.
  4. Repot into a fresh, airy mix suited to the plant. Water to settle, then let the top dry before the next watering.
  5. Dispose of infested soil in the trash. Don’t reuse it indoors.

Sanitize tools and wipe down shelves. Keep sticky traps up for another couple of weeks to confirm you’ve broken the cycle.

Conclusion

Fungus gnats stick around only when they have damp media to breed in. Confirm the pest, trap adults, dry the top layer, target larvae with a safe treatment, and adjust your potting mix and watering so the surface doesn’t stay wet. Monitor with sticky traps for a couple of weeks after you stop seeing adults. If you’re new to the plant you’re growing, identify it and tailor care—different species want different moisture levels. Once you’ve dialed that in, you’ll spend far less time swatting at flies and more time enjoying healthy growth. For ongoing help keeping watering on track, Plantico can send care reminders tuned to your plant, pot, and light.