How to Get Rid of Fungus Gnats (Step-by-Step Plan)

Fungus gnats are the most common houseplant pest by a wide margin. Tiny dark flies hovering around your plants and crawling on the soil surface are annoying, occasionally stressful for plants, and embarrassing when you have guests over. The good news: fungus gnats are also the easiest pest to eliminate, because they have one major weakness — they need consistently wet soil to reproduce.

Adult fungus gnat on plant leaf showing dark body and long legs

This guide walks through the complete fungus gnat treatment plan, from identification to permanent elimination.

Quick Answer: How to Get Rid of Fungus Gnats

Fungus gnats breed in consistently moist soil. Eliminate them by letting the top 1-2 inches of soil dry completely between waterings, which kills the larvae that cause the population to multiply. For adult flies, sticky yellow traps catch flying insects within days. Hydrogen peroxide soil drench (3% diluted 1:4 with water) kills larvae directly. Beneficial nematodes provide biological control for severe infestations. Most fungus gnat problems clear up within 2-3 weeks of letting soil dry properly.

What Fungus Gnats Are

Fungus gnats are tiny flies in the family Sciaridae. The adult flies (1/8 inch long, dark gray or black, slow-flying) live only about a week and are mostly an annoyance. The real problem is the larvae:

  • Larvae are tiny white worms with black heads, about 1/4 inch long
  • They live in the top inch of moist soil
  • They feed on decaying organic matter, fungi, and plant roots
  • Heavy infestations can damage roots, especially in seedlings or recently propagated plants
  • One adult lays 100-300 eggs in her week of life
  • Egg-to-adult cycle takes 3-4 weeks

The lifecycle in wet conditions can produce hundreds of new gnats per plant per month. Stopping the cycle requires breaking the moisture conditions that allow eggs and larvae to survive.

How to Identify Fungus Gnats

Adult flies

  • Tiny (1/8 inch / 3-4mm long)
  • Dark gray or black
  • Slow, weak flight pattern
  • Hover around plants and walk on soil surface
  • Often found near windows trying to escape
  • Visible most when you disturb the plant by watering or moving it

Larvae

  • Tiny white worms with black or dark heads (1/4 inch / 5-6mm)
  • Found in top inch of soil when you dig gently
  • Sometimes visible on bottom of pot when watering
  • Adult flies indicate larvae presence (you may not see larvae directly)

How they differ from other small flies

  • Fruit flies: tan or brown, faster flying, attracted to overripe fruit. Around kitchens, not plants.
  • Drain flies: fuzzy, moth-like wings, gray. Live in drain pipes, not plant soil.
  • Whiteflies: pure white, smaller, fly in clouds when disturbed. On leaves, not soil.
  • Fungus gnats: dark, weak flight, around plant soil. Most common houseplant pest.

Why You Have Fungus Gnats

The single cause is consistently moist soil. Specifically:

  • Watering more often than the soil needs
  • Overpotting (large pots holding soil that stays wet too long)
  • Pots without drainage
  • Saucers full of water
  • Heavy peat-based soil that holds water indefinitely
  • Newly purchased plants that arrived with eggs in the soil
  • Overwintering plants with reduced light not using as much water

The pest population is a direct symptom of overwatering. Eliminating the root cause (excess soil moisture) eliminates the pest naturally.

Treatment Method 1: Let Soil Dry (Most Important)

This single step solves most fungus gnat problems within 2-3 weeks. Larvae die in dry soil within days. Without continuous moisture, the lifecycle breaks.

How to do it

Stop watering until the top 2 inches of soil are completely dry. For most plants, this means waiting 1-2 weeks longer than your normal watering schedule. Use a moisture meter to confirm dryness before watering.

What happens

  • Days 1-3: larvae start dying as soil dries
  • Days 4-10: existing adult population dies off naturally (1 week lifespan)
  • Days 10-14: dramatic reduction in flying adults
  • Days 14-21: remaining infestation cleared

For plants that genuinely need consistent moisture (peace lily, ferns), this strategy doesn’t work as well. Use Method 3 (sticky traps) and Method 4 (hydrogen peroxide) instead.

Treatment Method 2: Bottom Watering

Bottom watering keeps the top of the soil drier than top watering, denying larvae the moist surface they need.

How to do it

Set the pot in a tray of water for 20-30 minutes. The soil absorbs water from below. The top inch stays drier than with top watering. Combined with letting soil dry between watering cycles, this disrupts the gnat lifecycle.

Treatment Method 3: Sticky Yellow Traps

Sticky yellow traps (Mosquito Bits or Trappify brand at most garden stores, $5-$15) attract flying adult gnats with yellow color and trap them in adhesive. They don’t kill larvae but reduce the breeding adult population.

How to use

Place 1-2 traps per affected plant, just above the soil surface. Replace when covered with insects (1-2 weeks). Use as a complement to soil-drying, not a replacement.

Treatment Method 4: Hydrogen Peroxide Soil Drench

3% hydrogen peroxide diluted 1:4 with water (1 part hydrogen peroxide to 4 parts water) kills larvae on contact when applied to soil.

How to use

Mix solution. Pour over soil as a normal watering. The solution fizzes briefly as it reaches larvae. Apply once. Larvae die within hours. Soil microbes recover within 1-2 weeks.

Caution: Use only diluted (not full-strength). Use only as a one-time treatment per infestation. Repeated applications damage beneficial soil microbes.

Treatment Method 5: Beneficial Nematodes

Microscopic nematodes (Steinernema feltiae specifically) feed on fungus gnat larvae but are harmless to plants, pets, and humans. Available online and at specialty garden stores ($15-$25 per package).

How to use

Mix nematode product with water per label instructions. Pour over plant soil. Nematodes find and infect larvae. Population builds over 2-4 weeks; provides ongoing biological control.

Best for serious collectors with persistent gnat problems. Overkill for one or two plants with mild infestations.

Treatment Method 6: BTi (Bacillus thuringiensis israelensis)

BTi is a naturally-occurring bacterium that produces a toxin specific to mosquito and gnat larvae. Sold as “Mosquito Bits” granules ($10-$15).

How to use

Sprinkle granules on soil surface. When you water, the bacteria release into soil and kill larvae over 24-48 hours. Reapply every 2 weeks for sustained control. Pet-safe and safe for beneficial insects.

Combination Treatment Plan

For severe infestations, combine multiple methods:

  1. Day 1: Place yellow sticky traps on every affected plant.
  2. Day 1: Apply hydrogen peroxide soil drench to kill existing larvae.
  3. Day 1: Sprinkle BTi granules on soil.
  4. Days 1-14: Stop watering until soil is dry 2 inches down.
  5. Day 14: Resume watering with restraint. Continue using BTi every 2 weeks.
  6. Day 30: Population should be eliminated. Continue dry-soil discipline.

How to Prevent Fungus Gnats Returning

  • Check soil before every watering. If still moist, wait.
  • Use well-draining soil. Heavy peat-based mixes hold moisture too long.
  • Use proper pot size. Oversized pots hold excess wet soil.
  • Empty saucers within 30 minutes of watering.
  • Quarantine new plants 2-3 weeks. Many infestations come from purchased plants.
  • Top dress with sand or aquarium gravel. A 1/2 inch layer on top discourages adult egg-laying.
  • Bottom water moisture-loving plants. Keeps top drier.

FAQ

Are fungus gnats harmful to my plant?

Adult gnats are mostly an annoyance. Larvae feed on roots and decaying matter; in heavy infestations, they can damage seedlings or stressed plants. For established mature houseplants, the impact is usually cosmetic. The Royal Horticultural Society’s fungus gnat guide covers their biology in more detail.

Can I just keep using sticky traps and not address the moisture?

You can, but the population persists. Sticky traps catch some adults but new ones hatch from larvae continuously. Without addressing soil moisture, the problem never fully resolves.

Will fungus gnats spread to other plants?

Yes. Adult gnats fly between plants, laying eggs in any consistently moist soil. Treat all plants together, not just the most affected one.

Are fungus gnats the same as drain flies?

No. Drain flies are larger, fuzzier, and live in plumbing drains. Fungus gnats are smaller, smooth, and live in plant soil. Different pests with different solutions.

Can I use vinegar traps for fungus gnats?

Apple cider vinegar traps catch some gnats but are less effective than yellow sticky traps. Yellow color attracts gnats specifically; vinegar attracts fruit flies more than fungus gnats. Use sticky traps for better results.

How long does it take to eliminate fungus gnats?

2-3 weeks with proper soil-drying and treatment. Persistent infestations indicate ongoing moisture problems that need to be addressed at the source. Most clear up within a month if all moisture sources are managed.

Are fungus gnats the same as fruit flies?

No. Fruit flies are tan or brown, smaller, and attracted to overripe produce. Fungus gnats are dark gray or black, slightly larger, and attracted to wet soil. Different species with different habitats.

Fungus Gnats Are Easy to Eliminate

Among houseplant pests, fungus gnats are the most beatable. Their entire lifecycle depends on continuously moist soil; remove that condition and they cannot reproduce. Combined with yellow sticky traps for adults and BTi for larvae, the population disappears within weeks.

For broader pest information, see our houseplant pests hub. For the underlying watering problem that often allows fungus gnats to establish, the overwatering signs and recovery guide covers the cause. For consistent moisture without overwatering, our complete watering guide covers the principles.

Dry soil between waterings ends fungus gnat problems. The plant tells you what it needs.

Related reading: For the broader context, see the complete guide to hard-to-kill houseplants, all troubleshooting guides, watering fundamentals.