Home plant-care-n-maintenance pest-n-disease-control Fungus Gnats in Houseplants: Causes, Fixes, and Soil Solutions
Pest & Disease Control

Fungus Gnats in Houseplants: Causes, Fixes, and Soil Solutions

Fungus gnats in houseplants are a sign that soil is staying too wet. Learn how to eliminate the current infestation and make simple drainage and watering changes that help keep them from returning.

Daniel Marsh Daniel Marsh
July 22, 2026
7 min read
Medium

This article contains affiliate links. GreenOurs may earn a commission at no extra cost to you.

Fungus Gnats in Houseplants: Causes, Fixes, and Soil Solutions

Small black flies rising off the soil every time you water aren't random. They're fungus gnats, and their presence is a direct readout of what's happening below the surface: your soil is staying wet longer than it should.

Adult gnats are a nuisance. The real damage happens underground, where their larvae feed on organic matter and fine root hairs in consistently damp soil. Spraying the adults does nothing if the conditions that produced them are still in place. You'll get a new batch within a week.

Fixing fungus gnats in houseplants means treating the soil, not chasing the flies. This guide covers why they showed up, how to interrupt their life cycle fast, and the drainage and watering changes that keep them from coming back.

What You're Actually Dealing With

Fungus gnats are often mistaken for fruit flies. The distinction matters because the fixes are different. Fruit flies are drawn to ripening produce and have a stockier, tan-colored body. Fungus gnats are thinner, darker, and almost exclusively found near soil, not fruit bowls.

Adults are weak fliers. You'll see them walking across the soil surface or making short, erratic hops when disturbed rather than sustained flight. They live for about a week, just long enough to lay 100 to 200 eggs in moist soil. Those eggs hatch into larvae within 4 to 6 days, and the larvae are the stage doing the actual feeding.

The larvae are translucent, legless, and roughly a quarter-inch long with a visible black head capsule. They live in the top 2 inches of soil, feeding on fungi, decaying organic matter, and root hairs. In a single infested pot, that's enough to slow water and nutrient uptake, especially in seedlings or recently repotted plants with limited root systems.

Small dark fungus gnat walking across the surface of moist potting soil
Adults are weak fliers — you'll usually spot them walking the soil surface rather than in the air.

Why Fungus Gnats Target Your Soil

Fungus gnats don't choose a plant. They choose a moisture level. Their entire life cycle depends on consistently damp soil, and three conditions create that environment more than any others.

Watering on a Schedule Instead of by Soil Condition

Watering every three days regardless of how the soil actually feels is the single biggest driver of gnat infestations. Different pots dry at different rates depending on size, material, and root density. A schedule ignores all of that and keeps the top inch of soil perpetually moist, which is exactly where gnats lay eggs.

Poor Drainage

Pots without drainage holes, or soil that's compacted and slow to drain, hold water at the root zone far longer than the plant needs. Water should move through the pot and exit within a few minutes of watering. If it's pooling or the soil stays saturated for days, drainage is the underlying issue, not the watering amount.

Organic Matter Buildup

Peat-heavy potting mixes and decomposing organic material on the soil surface — dead leaves, old mulch, decaying roots — give larvae a direct food source. Soil that's rich in undecomposed organic matter and stays wet is close to ideal breeding habitat.

Press a finger 2 inches into the soil before you water. If it's still damp, wait. This single habit prevents more gnat infestations than any trap or spray.

Treatment: Step by Step

Adult gnats need to be reduced immediately to stop egg-laying, while the larvae in the soil need a direct treatment. Run both at the same time.

  1. Set yellow sticky traps. Place 1 to 2 traps per pot, angled just above the soil surface. Adults are attracted to the color and get stuck before they can lay more eggs. Replace traps every 1 to 2 weeks until catches drop to zero.
  2. Apply a hydrogen peroxide soil drench. Mix 1 part standard 3% hydrogen peroxide with 4 parts water. Water the soil with this solution until it runs through the drainage hole. It will fizz on contact — that's the peroxide breaking down and killing larvae in the top layer of soil. It has no lasting effect on the plant and breaks down into water and oxygen within minutes.
  3. Let the top 1 to 2 inches of soil dry out fully between waterings. Larvae and eggs can't survive in dry soil. This is the step that actually interrupts the life cycle rather than just killing the current generation.
  4. Remove standing organic debris from the soil surface. Dead leaves, spent blooms, and moss holding excess moisture all need to go. This eliminates a direct food source for any larvae that survive the drench.
  5. Repeat the peroxide drench every 5 to 7 days for two to three cycles. One treatment kills what's currently in the soil, but eggs already laid will keep hatching. Repeated treatment across a full life cycle is what actually clears an infestation.
Yellow sticky trap positioned just above the soil surface in a potted plant
Yellow sticky traps catch adult gnats before they can lay another round of eggs.

Fixing the Soil for Good

Traps and drenches solve the immediate infestation. They don't fix the conditions that caused it. If the soil environment doesn't change, gnats come back within a month.

Rebuild Drainage

Repot into a mix that includes perlite, coarse sand, or orchid bark alongside standard potting soil — aim for at least 20 to 30% drainage material by volume. Confirm the pot itself has a drainage hole. If it's a decorative pot without one, use it as a cachepot around a properly draining inner pot rather than planting directly into it.

Change How You Water

Switch from a fixed schedule to checking soil moisture directly. Water thoroughly, then wait until the top 1 to 2 inches are dry before watering again. For most houseplants, that means longer gaps between waterings than a weekly routine assumes, especially in fall and winter when growth slows.

Repotting a houseplant into a fresh mix with visible perlite for better drainage
Working perlite or coarse sand into the mix is what actually keeps gnats from coming back.
Not sure which drainage amendment to use? Compare your options

Preventing Reinfestation

A layer of coarse sand or fine gravel spread half an inch thick over the soil surface makes it harder for adult gnats to lay eggs and dries out faster than bare potting mix. It's a low-effort barrier that pairs well with the watering changes above.

Quarantine any new plants for two weeks before placing them near your existing collection. Fungus gnats frequently arrive in the soil of nursery plants, and an unnoticed infestation in one new pot can spread through a whole windowsill within a few weeks.

When the Problem Persists

If gnats are still active after three full drench cycles and consistent dry-downs between waterings, check for a secondary moisture source — an overflowing saucer, a nearby humidifier, or a pot sitting in standing water. Soil that looks dry on top can still be saturated at the root ball if water has nowhere to drain to. In that case, repotting into fresh, well-draining soil resolves what surface-level treatment can't.

What to Do Next

Fungus gnats are one of the more forgiving pest problems to solve. There's no chemical guesswork and no waiting to see if a treatment worked. Dry soil and clean drainage will end an infestation on their own — the traps and drenches just speed up the timeline.

Get more diagnostic guides for common houseplant problems.

Recommended Products

Affiliate link — we may earn a commission at no extra cost to you.

Amazon

Safer Brand Houseplant Sticky Stakes

Captures flying adult fungus gnats as they emerge from the soil, preventing them from laying new eggs during treatment cycles.

Check price
Amazon

Summit Responsible Solutions Mosquito Bits

Delivers biological larvicide (Bti) to safely target and eliminate fungus gnat larvae in houseplant soil when soaked or watered in.

Check price
Daniel Marsh

Written by

Daniel Marsh

Calm expert plant care problem-solver

Daniel focuses on the technical side of plant health — pest and disease diagnosis, watering science, fertilizers, and tools.

More from Daniel Marsh →

Keep Exploring

Watering Indoor Plants Correctly Without Overdoing It

Beginner Basics

Watering Indoor Plants Correctly Without Overdoing It

7 min read
How to Use Yellow Sticky Traps for Pest Control (Correctly)

Plant Care

How to Use Yellow Sticky Traps for Pest Control (Correctly)

8 min read
Water Runs Out of Drainage Holes Immediately? Here's Why

Plant Care Science

Water Runs Out of Drainage Holes Immediately? Here's Why

8 min read
How to Test Soil Drainage Before You Plant Anything

Watering & Soil

How to Test Soil Drainage Before You Plant Anything

9 min read
Shore Flies vs Fungus Gnats: How to Tell Which Pest You Have

Pest & Disease Control

Shore Flies vs Fungus Gnats: How to Tell Which Pest You Have

9 min read