Pests & Problems

Pests & Problems

How to Get Rid of Fungus Gnats in Houseplants

Learn how to get rid of fungus gnats in houseplants fast with sticky traps, soil drenches, and watering changes that actually work.

How to Get Rid of Fungus Gnats in Houseplants

Fungus gnats are small, soil-dwelling flies whose larvae feed on organic matter and tender root tips in potting mix. If you spot tiny dark gnats hovering near your pots or skimming the soil surface, you almost certainly have them. The fix isn't complicated, but it does require tackling both the adults and the larvae simultaneously, swatting the flying ones buys you nothing if the next generation is already hatching in the soil.

At a Glance

  • Fungus gnat larvae need consistently moist, organic-rich soil. Letting the top 2 inches dry out between waterings is the single most effective fix.
  • A generation completes in about 17 days at room temperature, so you need to sustain treatment through at least two full cycles.
  • Yellow sticky traps catch adults and tell you whether the population is trending down; they don't stop larvae in the soil.
  • Bacillus thuringiensis israelensis (Bti) and beneficial nematodes both target larvae directly and are safe around pets and people.
  • Confirm it's gnats and not fruit flies with the raw-potato test before you spend money treating the wrong pest.
  • Most infestations clear in 3 to 4 weeks with consistent, two-front treatment.

Why Fungus Gnats Show Up

Why Fungus Gnats Show Up

The larvae (Bradysia species, most commonly) need moist, organic-rich soil to survive. They don't thrive in dry conditions; they thrive when the top few inches of potting mix stay consistently damp. Overwatering is the single most common reason a plant develops a gnat infestation. UC IPM's Pest Note on fungus gnats puts a number on how fast that gets out of hand: under warm conditions around 75°F, eggs hatch in about 3 days, larvae take roughly 10 days to reach the pupal stage, and adults emerge about 4 days after that, a full generation, egg to egg-laying adult, in around 17 days. At room temperature that means a small problem can turn into a visible cloud of gnats within a month if the soil never gets a chance to dry.

Peat-heavy potting mixes are especially hospitable because they retain moisture and decompose slowly, giving larvae plenty to eat. Perlite-amended or bark-based mixes dry out faster and are naturally less welcoming. If you're currently using a dense, moisture-retentive mix and seeing recurring gnats, switching to a faster-draining blend makes a real difference. Our guide to the best soil for houseplants breaks down which blends dry out quickly between waterings and which ones stay damp long enough to invite larvae back.

A few other triggers:

  • Bringing home a new plant with larvae already in the nursery soil
  • Repotting with old, partially composted potting mix
  • Keeping plants in low-light spots where evaporation is slow
  • Saucers that hold standing water for more than a day

Fungus gnats are annoying rather than catastrophic for most established plants, but heavy larval feeding on root hairs can stress seedlings and cuttings badly enough to stunt or kill them. Worth noting: UC IPM points out that wilting is more often caused by root decay fungi and generally poor soil conditions than by gnat larvae alone, so if a mature plant is wilting badly alongside a gnat problem, check the roots for rot rather than assuming the gnats are the whole story.

How to Confirm It's Fungus Gnats (Not Fruit Flies)

Fruit flies circle around ripening fruit and fermenting liquids. Fungus gnats circle soil and are most active near the pot surface. To check: press a piece of raw potato, cut side down, onto the soil surface for 24 hours. If you lift it and see tiny white larvae clinging to the flesh, you have fungus gnats. If not, the problem is likely fruit flies originating elsewhere in the kitchen.

Adult fungus gnats are about 2 to 3 mm long, dark gray to black, with long legs and segmented antennae longer than the head, and they fly with a slow, meandering pattern rather than the quicker darting flight of a fruit fly. Under magnification the larvae are translucent white to clear with a shiny black head, which is where the "black-headed" nickname comes from.

Getting Rid of Fungus Gnats: A Two-Front Approach

Controlling fungus gnats means addressing adults above the soil and larvae below it at the same time. Doing one without the other just prolongs the infestation.

Step 1: Let the Soil Dry Down

Before reaching for any product, change your watering habit. Allow the top 2 inches of soil to dry out completely between waterings. For most tropical houseplants (pothos, philodendrons, peace lilies) this won't cause harm. Succulents and cacti can go much longer. Bottom watering, setting the pot in a tray of water for 20 to 30 minutes, then draining, keeps the top layer of soil dry while still hydrating the root zone.

This single change collapses larval survival rates dramatically because newly hatched larvae desiccate quickly in dry soil. It's also the step University of Maryland Extension lists first: when soil dries out, the larvae feeding in it die, and adjusting the watering cycle so soil doesn't stay wet is the foundation the other treatments build on.

Step 2: Use Yellow Sticky Traps

Yellow sticky traps catch adult gnats and break the egg-laying cycle. Place them horizontally just above soil level (adults tend to stay low) or vertically near the pot. One trap per medium pot is usually enough. Check them every few days; a heavily infested plant might fill a trap within a week.

Sticky traps won't eliminate an infestation on their own, but they give you a reliable measure of whether the population is declining over two to three weeks. If a fresh trap catches close to nothing, you know the larval treatments below are working; if it fills up just as fast as the last one, the soil is still breeding new adults.

Step 3: Apply a Biological or Chemical Soil Drench

This is where you target larvae directly.

Bacillus thuringiensis israelensis (Bti) is a naturally occurring soil bacterium sold under names like Mosquito Bits or Gnatrol. It's highly effective against fungus gnat larvae and is safe for plants, pets, and people. Soak the Mosquito Bits in water for 30 minutes, then use that water to drench the soil. Repeat every 5 to 10 days for a month, UC IPM notes Bti needs repeat applications roughly every five days because it doesn't persist or reproduce in the soil the way a living biological control would. Bti only works when larvae ingest it, so the drench needs to reach down through the root zone.

Beneficial nematodes (Steinernema feltiae) are microscopic roundworms that actively seek and parasitize larvae in soil. Mix them into water per package directions and apply as a drench immediately (nematodes don't survive long once mixed). Soil temperature between 50 and 85°F (10 to 29°C) is needed for them to stay active. Unlike Bti, nematodes can establish and provide season-long control after a couple of initial applications, since they reproduce in the soil as long as larvae are present to parasitize. Nematodes are completely harmless to plants, people, and pets.

Hydrogen peroxide drench (3 percent solution, diluted 1 part peroxide to 4 parts water) kills larvae on contact through oxidation. It breaks down into water and oxygen quickly and doesn't harm roots at this dilution. It's a useful quick fix but has no residual effect, so you may need to repeat it after 5 to 7 days.

Step 4: Consider a Top Dressing

Applying a 1-inch layer of coarse horticultural sand or fine gravel on top of the potting mix makes the surface inhospitable to egg-laying adults. They prefer to oviposit in moist organic material; dry inorganic topdressings discourage them. This won't cure an active infestation but reduces reinfection once you've knocked the population down.

Treatment Timeline

WeekWhat to do
Week 1Set sticky traps; let soil dry; apply first Bti drench
Week 2Reapply Bti drench; check trap counts
Week 3Third Bti drench; assess sticky trap catches
Week 4If population is down, maintain dry-top watering; add topdressing
OngoingContinue bottom watering; replace sticky traps monthly as monitoring

Most infestations resolve within 3 to 4 weeks with consistent treatment. If you still see heavy adult activity at week four, consider swapping to a fresh, perlite-rich potting mix after knocking the larvae back.

Choosing a Method: Quick Comparison

MethodTargetsSpeedRepeat intervalNotes
Drying the soilLarvae (indirectly)Slow, ongoingEvery wateringFoundation for everything else
Yellow sticky trapsAdultsImmediate catch, slow population effectReplace weeklyMonitoring tool, not a cure
Bti drenchLarvaeVisible drop in 1-2 weeksEvery 5-10 daysSafe around pets and people
Beneficial nematodesLarvaeVisible drop in 2-3 weeksOnce, repeat after 4 weeksCan self-sustain in soil
Hydrogen peroxide drenchLarvae, on contactImmediate, no residualEvery 5-7 daysGood for a fast knockdown
Sand or gravel topdressingAdults (prevention)N/A, preventive onlyOnceReduces reinfection, not a cure

Plants Most Commonly Affected

Fungus gnats hit hardest where potting mix stays moist the longest. In practice, that means:

  • Ferns and calatheas, both prefer consistent moisture, giving larvae a steady window
  • Peace lilies (Spathiphyllum), often kept too wet
  • Pothos and heartleaf philodendrons, popular, frequently overwatered
  • Seedling trays and propagation setups, high humidity, constant moisture, and tender roots are ideal for larvae

Succulents and cacti can get gnats if overwatered, but their natural preference for dry soil makes serious infestations uncommon.

If you're also dealing with discolored foliage alongside pest damage, check our guide on why plant leaves turn yellow, larval root feeding can sometimes cause yellowing that gets mistaken for a nutrient or watering problem.

Preventing Fungus Gnats from Coming Back

Once you've cleared an infestation, a few habits keep gnats from returning:

  • Water on a schedule tied to soil moisture, not the calendar. Stick a finger 2 inches into the soil; if it's still damp, wait.
  • Use a well-draining mix. Adding 20 to 30 percent perlite by volume to any standard potting soil improves drainage considerably.
  • Inspect new plants before bringing them home. Press a small piece of potato into the soil at the nursery or quarantine new arrivals for a week on their own.
  • Avoid leaving fallen leaves or decomposing organic matter on the soil surface.
  • Empty saucers within a few hours of watering rather than letting standing water sit under the pot for days.

Fungus gnats are one of the more common pest problems you'll run into with indoor plants. Unlike spider mites, which reproduce fast enough to defoliate a plant in weeks, gnats are more a nuisance pest. But if you're propagating cuttings or growing seedlings, keep an eye out for the signs covered in our guide to identifying and treating spider mites, since pest pressures often cluster in similar environments. Similarly, a plant weakened by gnat larvae can become more susceptible to other issues; see our mealybug treatment guide if you notice cottony white spots alongside a gnat problem.

Frequently Asked Questions

Will fungus gnats harm my plants?

For mature, established plants, a moderate infestation is mostly cosmetic, irritating, but unlikely to cause serious damage. The larvae feed on decaying organic matter and fine root hairs rather than healthy root tissue. However, seedlings, freshly rooted cuttings, and plants already stressed by overwatering can decline from larval feeding because their root systems are too small to absorb the damage.

Can I use dish soap to kill fungus gnats?

A dilute dish soap solution (a few drops per quart of water) kills adult gnats on contact when sprayed directly. It doesn't work on larvae in soil, and it can damage leaves or disrupt beneficial soil biology if overused. It's a quick short-term measure, not a treatment plan.

How long does it take to get rid of fungus gnats completely?

Expect 3 to 4 weeks with consistent treatment. The adult lifespan is about a week, and a full generation from egg to adult runs about 17 days under warm indoor conditions, so you need to sustain pressure through at least two full cycles. Sticky traps give you a visible record of whether numbers are trending down.

Are fungus gnats dangerous to people or pets?

No. They don't bite, don't transmit disease, and don't infest food. They're a plant-specific nuisance. That said, if you're treating soil with any product, keep pets from digging in treated pots until the drench has dried and been absorbed.

Do fungus gnats come from store-bought potting soil?

Yes, sometimes. Bags of moist potting mix can harbor eggs or larvae. Leaving bags open and moist encourages them. Use fresh mix promptly after opening, store remaining mix in a sealed container, and consider spreading fresh mix out on a tray to dry slightly before use if you've had gnat problems before.

Do fungus gnats fly away if I just move the plant outside?

Moving a heavily infested plant outdoors doesn't solve the problem, it just relocates it, and outdoor conditions can let the population grow faster since there's no reason to control humidity or watering the way you would indoors. Treat the infestation in place with soil drying and a larval drench, then bring the plant back in once trap counts drop for a couple of consecutive weeks.

Is it normal to still see a few gnats even after treatment seems to be working?

Some stragglers are normal for the first couple of weeks. Adults that were already pupae when you started treating won't be affected by a soil drench, they still have to finish emerging. As long as trap counts are trending down week over week and you're not seeing fresh larvae in a potato test, the treatment is working, it just needs another cycle to finish clearing the population already in the soil.

← Back to all guides