Skip to main content

How to Get Rid of Fungus Gnats on Houseplants

By · PlantCareAI Editorial

If you see tiny dark flies hovering around your houseplants or zigzagging near the soil surface, you have fungus gnats. Adults are harmless to people, but their larvae feed on organic matter and young roots in moist soil; and they reproduce fast. A single female lays up to 200 eggs in wet topsoil over her one-week lifespan. The key to getting rid of them permanently is understanding why they are there, then removing the conditions that let them thrive.

Quick Answer: Fungus gnats breed in moist topsoil. The #1 cause is overwatering; they cannot reproduce in dry soil. To eliminate them: let the top 2 inches dry between waterings, use yellow sticky traps for adults, and apply a hydrogen peroxide soil drench (1 part 3% H2O2 to 4 parts water) weekly to kill larvae. Most infestations clear in 2–3 weeks.

A cluster of tiny fungus gnats hovering above moist potting soil in a terracotta pot
Fungus gnats breed in wet topsoil; dry soil is your most effective weapon.

Why You Have Fungus Gnats (And How to Fix Each Cause)

  1. Overwatering (the #1 cause)

    Fungus gnats cannot reproduce in dry soil. They lay eggs specifically in moist topsoil, and larvae need constant humidity to survive. If you water before the soil has dried out sufficiently, you are running a continuous breeding operation for them.

    How to fix it: Let the top 1–2 inches of soil dry completely before each watering. Use the finger test; if it still feels damp at 1 inch deep, wait. For plants that already have gnats, let soil dry even deeper than usual for a few weeks to break the cycle.

  2. Soil that retains too much moisture

    Dense, peat-heavy potting mixes stay wet for days after watering. Even with careful watering habits, the wrong soil mix keeps the root zone moist long enough for gnats to establish. Soil that stays wet for more than a week is a gnat nursery.

    How to fix it: Amend existing soil with perlite or pumice (25–30% by volume) to improve drainage and drying speed. For future repotting, use a chunky, well-draining mix rather than dense peat-based soil.

  3. Newly purchased plants

    Nursery and garden center plants frequently arrive with gnat eggs or larvae already in the soil. This is one of the most common ways gnats enter a home; they hitch a ride on a new plant and then spread to others.

    How to fix it: Inspect all new plants before bringing them home. Quarantine new arrivals for 2 weeks before placing them near your other plants. Consider repotting into fresh, sterile potting mix when you buy new plants.

  4. Organic matter and decomposing material in soil

    Larvae feed on the fungi, bacteria, and decaying organic matter present in potting soil; not just roots. Old soil, fallen leaves left on the soil surface, and heavily organic mixes all provide extra food sources that sustain larger gnat populations.

    How to fix it: Remove fallen leaves and organic debris from the soil surface regularly. Replace potting mix every 1–2 years. Avoid top-dressing with compost indoors.

  5. Pots without drainage or saucers left full of water

    Without drainage holes, water pools at the bottom of the pot and keeps the entire soil column moist indefinitely. Saucers left full of water after watering have the same effect; the soil wicks it back up, staying wet far longer than intended.

    How to fix it: Always use pots with drainage holes. Empty saucers 30 minutes after watering. If you love a cachepot with no holes, use a plain nursery pot inside it.

  6. Plants grouped closely without airflow

    When plants are crowded together without air circulation, the soil takes much longer to dry and ambient humidity stays elevated around the pots; ideal conditions for gnat breeding.

    How to fix it: Spread plants apart to allow air to circulate between pots. A small fan on low nearby can dramatically reduce drying time and humidity around the soil surface.

  7. Garden soil used in containers

    Garden soil brought indoors for container use frequently contains gnat eggs, larvae, and other pests. It also compacts easily in pots, retaining moisture much longer than commercial potting mix.

    How to fix it: Always use sterile commercial potting mix for indoor containers; never garden soil. If you want a soil amendment, choose perlite or pumice rather than outdoor soil or compost.

  8. Compost or organic waste stored near plants

    Open compost bins, fruit bowls, and organic waste containers near houseplants attract adult gnats looking for moist, organic places to lay eggs. They will readily move from the compost to nearby plant soil.

    How to fix it: Store compost bins away from plants and keep them tightly sealed. Dispose of overripe fruit promptly. Keep food waste well separated from your plant area.

How to Treat Root Rot: Step-by-Step

  1. Let the soil dry out between waterings; the top 1-2 inches should be completely dry

    A finger pressing into dry soil beside a crossed-out watering can, showing the soil should be dry before watering
    Step 1; Let the top 1–2 inches dry completely. No moist soil, no gnats.
  2. Place yellow sticky traps near the soil surface to catch adult gnats

    A yellow sticky trap staked near the soil surface of a potted plant with small flies caught on it
    Step 2; Yellow sticky traps near the soil catch adult gnats and break the cycle.
  3. Apply a hydrogen peroxide drench (1 part 3% H2O2 to 4 parts water) to kill larvae

    A watering can pouring a diluted hydrogen peroxide solution into a pot, with bubbles visible on the soil surface
    Step 3; 1 part 3% H2O2 to 4 parts water kills larvae on contact.
  4. Add a 1/2-inch layer of sand or perlite on top of the soil to deter egg-laying

    A scoop of Bti granules (Mosquito Bits) being added to a watering can before application
    Step 4; Bti (Mosquito Bits) targets larvae biologically; safe for plants and people.
  5. Consider using Bti (Mosquito Bits) in watering water for persistent infestations

    A hand spreading a thin layer of coarse sand over the soil surface of a houseplant pot
    Step 5; A half-inch sand or perlite layer deters egg-laying on the soil surface.
  6. Repot in fresh, well-draining potting mix if the infestation is severe

    A calendar showing a 3-week treatment cycle with checkmarks on repeat treatment days
    Step 6; Repeat treatments every 5–7 days for 3 weeks to break the egg cycle.
  7. Maintain drier watering habits going forward to prevent recurrence

    A pot sitting in a shallow tray of water, absorbing moisture from below while the topsoil stays dry
    Step 7; Bottom watering keeps the topsoil dry, eliminating the breeding ground.

Fungus Gnat Treatment Methods Compared

For best results, combine 2–3 methods simultaneously:

Method Targets Speed Effort
Drying soil out Larvae (prevents new eggs) Slow (1–2 weeks) Low
Yellow sticky traps Adults only Immediate Low
Hydrogen peroxide drench Larvae and eggs Fast (1–3 weeks) Low
Sand/gravel top layer Prevents egg-laying Immediate barrier Low (one-time)
Mosquito dunks (BTI) Larvae specifically 1–2 weeks Low
Neem oil drench Larvae and eggs 1–2 weeks Medium
Apple cider vinegar trap Adults only Immediate Low
Full repotting Everything (removes all) Immediate High
Bottom watering only Keeps surface dry Ongoing prevention Medium

Frequently Asked Questions

Are fungus gnats harmful to plants?
Adult gnats are mostly harmless nuisances. Their larvae can damage young roots and seedlings in large numbers, but mature plants usually tolerate them. The bigger issue is they signal overwatering.
How long does it take to get rid of fungus gnats?
With consistent treatment; drying soil, sticky traps, and soil drenches; most infestations clear up in 2–3 weeks. The full life cycle is about 21–28 days, so you need to sustain treatment long enough to interrupt multiple generations.
Are fungus gnats the same as fruit flies?
No. Fungus gnats are darker, more slender, and fly close to soil; they zigzag near plant pots when disturbed. Fruit flies are rounder, brownish-orange, and congregate near overripe fruit, drains, and food waste. If the flies appear when you water and hover at soil level, they are fungus gnats.
How fast do fungus gnats reproduce?
Very fast. A female lays up to 200 eggs in moist topsoil over her one-week adult lifespan. Eggs hatch in 3–6 days, larvae feed for about 2 weeks, then pupate for 3–5 days before emerging as adults. The full cycle from egg to adult is 21–28 days; which is why treatments need to run for at least 3 weeks to break it completely.
Does cinnamon kill fungus gnats?
Cinnamon has mild antifungal properties and can deter gnats when sprinkled on topsoil, but it is not effective enough to clear an active infestation. Use it as a supplement, not a primary treatment.
Why do I keep getting fungus gnats back?
Recurring infestations almost always mean the soil is staying too moist. Address your watering habits permanently, improve soil drainage, and new gnats will not be able to establish. Also check that no new infested plants were brought in.
Can fungus gnats spread to other plants?
Yes; adult gnats fly between plants and will lay eggs in any moist soil they find. Treat all nearby plants simultaneously, not just the most visibly affected one.

The Bottom Line on Fungus Gnats

Fungus gnats are a moisture problem in disguise. The most effective strategy combines three approaches: dry the soil out (stops egg-laying), trap adults (sticky traps or vinegar), and kill larvae (H2O2 drench or BTI). Within 2–3 weeks, they'll be gone. For long-term prevention, never let soil stay constantly soggy and use well-draining potting mixes.

Get Personalized Plant Care Advice

PlantCareAI uses your location and local weather to give you advice tailored to your exact situation. No signup required to try.

Try the AI Plant Doctor