Skip to main content

How to Get Rid of Fungus Gnats: 7 Proven Steps That Work

7 min read
gardeninghow-to-get-rid-of-fungus-gnatsfungus-gnatshouseplant-pestssoil-gnats

A close-up of hands preparing potting soil, illustrating how to get rid of fungus gnats

Fungus gnats are one of the most frustrating houseplant pests because they just keep coming back - until you treat the right targets. The flying adults you see are only a small fraction of the problem. Most of the population lives in the soil as eggs and larvae, so any plan that only sprays the air will fail. This guide walks you through the exact steps to get rid of fungus gnats for good, using safe, natural methods.

Quick Answer: To get rid of fungus gnats, treat both life stages at the same time. Place yellow sticky cards at soil level to catch the adults, and water your plants with a BTI or hydrogen peroxide solution to kill the larvae in the soil. Keep the top few inches of soil dry between waterings, and repeat every watering cycle for at least four weeks.

Step 1: Confirm You Actually Have Fungus Gnats

Before you treat anything, make sure the flies bothering you are fungus gnats and not fruit flies. Fruit flies are tan or amber with red eyes and hover around fruit and drains. Fungus gnats are black or dark gray, fly slowly, and stay close to the soil of your houseplants.

If you are unsure, do the potato test: press a thick slice of raw potato onto the soil surface and check it after four to six hours. Thin, translucent-white worms with black heads gathering on the wet potato confirm that larvae are breeding in the soil. For more detail, see our guide on what are fungus gnats.

Step 2: Stop Overwatering Immediately

Fungus gnats cannot breed without damp soil, so watering habits are the foundation of every successful treatment. Check the soil before you water: push a finger one to two inches into the pot and only water when that top layer feels dry.

Once treatment starts, switch to bottom watering where possible. Set the pot in a shallow tray or sink with an inch of water and let the soil wick up moisture through the drainage holes. The surface stays dry, which discourages adults from laying eggs and starves the larvae that need moist conditions.

Step 3: Catch the Adults With Yellow Sticky Cards

Yellow sticky traps are the fastest way to reduce the flying adults and stop them from laying more eggs. Fungus gnats are attracted to bright yellow, mistaking it for a healthy leaf, and they stick on contact.

Cut the cards into small squares and place them directly on the soil surface, or use the small plastic stakes. Put a trap in every affected pot at soil level. Replace the cards as they fill up, and leave them in place for several weeks - they also act as a live monitor that tells you when the infestation is finally over.

Step 4: Kill the Larvae With a BTI Drench

BTI (Bacillus thuringiensis israelensis) is a natural soil bacterium that is the single most effective weapon against fungus gnat larvae. It is safe for humans, pets, and plants, and it acts only on mosquito-like larvae, including fungus gnats.

Mosquito dunks are the easiest way to use it:

  1. Crumble a quarter of a dunk into your watering can.
  2. Fill with warm water and let it steep overnight.
  3. Water your houseplants thoroughly with the β€œtea” on every watering.
  4. Continue for at least four to six weeks to cover the entire life cycle.

Each female gnat can lay up to 200 eggs, and larvae hatch within days, so consistency matters more than intensity. Missing a single water cycle lets a new generation survive.

Step 5: Add a Hydrogen Peroxide Drench

For a fast knockdown of larvae in the soil, use a hydrogen peroxide drench. Mix one part standard 3% hydrogen peroxide with four parts water, wait until the soil is dry, and water the plant thoroughly.

The mixture fizzes as it moves through the potting mix, killing larvae on contact and releasing oxygen that helps damaged roots recover. Apply the drench every few waterings for two to three weeks. Use it in addition to BTI, not instead of it - the combination covers both immediate and long-term control.

Step 6: Block the Soil With a Sand or Diatomaceous Earth Barrier

A physical top dressing keeps new eggs from ever being laid. Pour a clean, dry half-inch layer of fine play sand over the soil surface. The sand drains and dries almost instantly after watering, so adults cannot reach the moist soil below, and larvae trying to crawl out get stuck.

Diatomaceous earth (DE) is an alternative: dust a thin layer of food-grade DE over dry soil in the path gnat larvae crawl through. It is a fine powder made of fossilized algae with microscopic sharp edges that cut insects without touching your plant. Remember that DE only works when it is dry, and wear a simple dust mask while applying it.

Step 7: Repot Only When the Infestation Is Severe

Most infestations respond to the steps above within a month, but a badly infested plant may need a fresh start. If larvae are everywhere and the roots are damaged, repot the plant:

  1. Take the plant outside and shake all the old soil off the roots.
  2. Rinse the roots under cool water to wash off eggs and larvae.
  3. Scrub the pot with hot, soapy water and a splash of bleach.
  4. Repot in fresh, sterile potting mix from a sealed bag.

Do not repot just to be safe - repotting stresses plants. Reserve it for the worst cases, and always inspect the new soil’s source so you do not reintroduce the problem.

Natural Remedies Compared

Method Targets How fast Best use
Yellow sticky cards Adult flies Immediate Every pot, all season
BTI (mosquito dunks) Larvae in soil 2–4 weeks As a regular watering treatment
Hydrogen peroxide drench Larvae on contact Days Quick knockdown of heavy infestations
Sand top dressing Egg-laying adults 1–2 weeks Prevention and ongoing protection
Diatomaceous earth Crawling larvae 1–2 weeks On dry soil surfaces only
Bottom watering The whole cycle Ongoing Prevention while you treat

Apple cider vinegar traps, essential-oil sprays, and neem oil often appear in pest-control lists, but they are weak tools against fungus gnats. Vinegar attracts fruit flies, not gnats; neem oil does not soak deep enough to reach larvae; and surface sprays leave the soil population untouched. Stick with the two-part strategy: trap the adults, kill the larvae.

Your 4-Week Treatment Timeline

Week 1: Place sticky cards, start letting the soil dry out, and begin BTI watering. Most of the flying adults will be gone within days.

Weeks 2–3: Keep treating every water cycle. Larvae from the last eggs now hatch and meet your treatments. Add a hydrogen peroxide drench if adults are still active.

Week 4: Cut back watering further and watch the sticky cards. When cards stay clean for two weeks, the infestation is cleared. Keep bottom watering and dry soil habits to prevent a return.

Preventing Fungus Gnats From Coming Back

Everything that attracted the gnats in the first place will attract them again, so prevention is part of any permanent fix:

  • Let the top two inches of soil dry out between waterings.
  • Prefer bottom watering over top watering.
  • Store bags of potting soil in sealed bins, never open in damp sheds or garages.
  • Quarantine new plants for two to three weeks in a separate room.
  • Choose well-draining soil mixes and avoid heavy peat blends that stay soggy.

Get the full picture on identifying and understanding these pests first in our guide on what are fungus gnats, and keep your whole plant collection healthy with our guide to watering houseplants.

Frequently Asked Questions

With consistent treatment, most infestations clear up in four to six weeks. You must keep treating the soil through every water cycle until all the hidden eggs and larvae hatch and die. Stopping early is the most common reason gnats come back.

No. Vinegar traps are made for fruit flies, which love sweet and fermenting scents. Fungus gnats are attracted to damp soil and plant fungi, so they ignore vinegar. Use yellow sticky cards placed at soil level instead to catch the flying adults.

Yes. Mosquito dunks contain BTI, a natural soil bacterium that only targets mosquito and fungus gnat larvae. It is completely safe for humans, pets, and plants, and it is one of the most effective ways to kill gnat larvae in soil.

Yes. Mixing one part 3% hydrogen peroxide with four parts water and watering the dry soil kills larvae on contact by fizzing through the soil. It also releases extra oxygen, which helps damaged roots recover. Repeat the drench every few waterings for two to three weeks.

Fungus gnats return when a few eggs survive the treatment, when you stop treating too early, or when the soil stays too wet. Combined methods that catch adults and kill larvae for at least a month, plus letting the soil dry between waterings, break the cycle for good.

For outdoor plants and garden beds, the same principles apply: stop overwatering, remove soggy mulch and fallen debris, clear drainage, and apply dry sand or diatomaceous earth over the soil surface. Encourage natural predators like rove beetles and predatory mites by avoiding chemical pesticides.

Ilisa Beurg β€” Lead Gardening Writer & Editor

Ilisa Beurg has been growing food and flowers for over a decade, from a tiny balcony herb garden to a full kitchen-garden plot. Her guides are built on hands-on experience and are checked against university extension research before publication.

Disclaimer: The information on Paliurus.com is for general gardening guidance only. Results may vary by climate, soil type, and plant variety. Always check your local growing conditions.Read our full disclaimer β†’