Fungus Gnats in Houseplants How to Fix the Soil (October 2026)

Fungus gnats in houseplants how to fix the soil comes down to moisture and drainage: the flies are adults, and the larvae living in wet potting mix are what you actually have to kill. Let the top inch of soil dry between waterings, strip out the infested top layer, hit the remaining mix with a soil treatment, and cut off the adults with traps. Expect 3 to 4 weeks for a generation to complete, and 6 to 8 weeks for the whole thing to clear.

Most of this is a watering problem, not a plant problem. A female fungus gnat will lay up to 200 eggs in the moist top two inches of potting mix, and that is exactly the zone most indoor plants keep permanently wet.

Traps and sprays alone rarely solve it, and a full repot on its own is not a guaranteed fix either. You need a layered approach that hits every life stage at once.

What You Need

Gather everything before you start, because the job goes fast once a plant is out of its pot.

  • Fresh, airy potting mix. A peat-and-perlite houseplant blend, or a mix amended with perlite, fine bark, or pumice so water moves through it fast.
  • A clean pot with drainage holes. Wash the old pot with hot soapy water and a scrub brush, then rinse it, before reusing it. If the pot has no holes, buy one that does.
  • A small trowel or a spoon. A spoon is genuinely better for small pots and delicate roots.
  • Yellow sticky traps. These are the monitoring tool and the adult control tool. Buy the unperforated type and push them into the soil near the rim.
  • Food-grade diatomaceous earth. Check the label for food grade. Apply a thin, even layer on the dry soil surface and keep it dry.
  • Bti granules (mosquito bits, mosquito dunks, or Gnatrol). The active ingredient is Bacillus thuringiensis subsp. israelensis, a bacterium that targets larvae in the soil.
  • 3% hydrogen peroxide from the pharmacy aisle, for a soil drench at 1 part peroxide to 4 parts water.
  • Ground cinnamon and horticultural sand or fine gravel for surface barriers.
  • Clean gloves and a work surface you can sweep up afterwards. Do this outside or in the sink if you can, because dry infested mix is easy to scatter.

Two optional extras earn their place. Beneficial nematodes work well on large infestations if you can get them live, and a slice of raw potato set on the soil surface draws larvae up where you can see them.

Step-by-Step: Fungus Gnats in Houseplants How to Fix the Soil

Step-by-Step: Fungus Gnats in Houseplants How to Fix the Soil

The protocol runs in four stages: confirm what you have, remove the soil that is hosting the larvae, change how you water and drain, then control the adults and block new ones from arriving. Work through them in order. Skipping ahead to the traps is why so many people give up at week two.

Fungus Gnats in Houseplants How to Fix the Soil: Identify the Source

Fungus gnats are small dark flies in the family Sciaridae, sometimes called sciarid flies or fungus midges. Adults are roughly 1/8 inch long, dark grey to black, with a narrow body, long legs, and a distinctive Y-shaped vein pattern in the wings that you can pick out with a phone camera held close. They move in a jerky, looping path rather than the smooth glide of a fruit fly.

The larvae are the reason it matters. They are translucent-white, legless, up to about 1/4 inch long, with a distinct black head, and they feed in the wet surface layer on fungi, decaying organic material, and fine root hairs. When you see tiny pale worms with black heads wiggling when you poke the soil, that is the population actually eating your plant.

Here is the 30-second check. Set a slice of raw potato on the soil surface and leave it a few hours, then lift it and look at the underside. A handful of pale larvae with black heads means fungus gnats. Nothing on the potato but plenty of flies in the air points to fruit flies instead, which breed in kitchen drains, trash cans, and overripe fruit, and which need a completely different fix. Fungus midges, the larger mosquito-shaped variety, are not a houseplant soil problem in the same sense and turn up near houseplants grown in open air.

Anywhere you can identify, treat. Fruit flies stay in the kitchen and ignore your plants entirely.

The conditions that produce an infestation are boring and consistent: soil that stays damp at the surface, pots without drainage holes, a cachepot or saucer holding water underneath, heavy organic mixes that stay wet for weeks, dead leaves and decaying roots left in the pot, and high plant density in a dim room. Fungus gnats do not arrive from nowhere. They arrive in an open bag of potting mix, on a plant bought from a greenhouse, or on a plant that summered outdoors and came back inside in the fall.

Fungus Gnats in Houseplants How to Fix the Soil: Remove and Replace Problem Soil

Fungus Gnats in Houseplants How to Fix the Soil: Remove and Replace Problem Soil

This is the step that fixes more infestations than anything else, because the eggs and larvae sit in the top two inches of mix. Work outside if you can, or over a tray you will wipe down afterwards.

  1. Take the plant out of its pot. Tip it out gently rather than pulling. If the mix is wet and compacted, a spoon helps you slide the root ball free.
  2. Strip the top 1 to 2 inches of potting mix. This is the egg-laying zone. Pick it out with gloved fingers and drop it straight into a sealed bag. Do not compost it, and do not shake it out over your floor.
  3. Look at the roots. Healthy roots are firm and pale. Brown, mushy, sour-smelling roots mean root rot is happening at the same time, and that changes how you pot it back up. Peel away the dead material and cut back soft sections with clean scissors.
  4. Clean the pot. Wash it with hot soapy water, scrub the inside, and rinse. Vinegar does a decent job on mineral and algae crust but does not reliably kill fungus gnat eggs, so follow up with soap and water.
  5. Refill with fresh, airy mix. Fill about a third of the way down, set the root ball in, then backfill. Aim for a mix you can squeeze into a loose clump and it falls apart. If yours holds together like wet cement, that is why the gnats are there.

Before you refill, treat the fresh mix. Here are the doses, because this is the detail most guides skip.

  • Bti drench (mosquito bits, mosquito dunks, Gnatrol). The community recipe: soak 2 to 3 tablespoons of Bti granules in one gallon of water overnight, then pour the liquid through the soil as a drench. Undiluted granules can also be worked lightly into the top layer. Reapply every 5 to 7 days for two or three rounds, since Bti only kills larvae that ingest it.
  • Hydrogen peroxide. Mix 1 part 3% hydrogen peroxide with 4 parts water, and drench the soil. It works on contact with larvae and on contact with adults, so you may see them scatter immediately, which is the point. Use it on moist soil, never on bone-dry soil, and stop if a plant shows stress. Undiluted peroxide will burn roots.
  • Diatomaceous earth. Dust a thin, even layer over the dry soil surface. It works by abrading and dehydrating soft-bodied insects on contact, so it must stay dry and undisturbed to do anything. It washes into the mix with watering and needs reapplying. Do not inhale it.
  • Beneficial nematodes. Mix into the watering can and drench. The one option on this list that will chase larvae down into the mix rather than waiting for them at the surface. Temperature and timing matter more than the dose.
  • Cinnamon. A thin top dusting. Be honest about this one: the evidence for cinnamon actually killing larvae is weak. It makes the surface less appealing as an egg-laying site. Treat it as a deterrent, not a fix.

Here is how the options compare.

MethodLife stage it killsDoseTime to actPlant safety
Drying the surfaceEggs and newly hatched larvaeTop inch dry between wateringsSlow but permanentExcellent, if you match watering to the plant
Bti granules or dunksLarvae only2 to 3 tbsp per gallon, soaked overnight1 to 3 daysVery good
Hydrogen peroxide drenchLarvae and adults on contact1 part 3% peroxide to 4 parts waterSame dayGood at this dilution; burns roots if stronger
Diatomaceous earthLarvae and pupae on contactThin even layer on dry soil24 to 48 hoursGood; avoid inhaling the dust
Yellow sticky trapsAdults onlyOne per pot or per roomImmediateExcellent
Insecticidal soap sprayAdults on contactPer labelImmediateGood, but it must touch the fly
Replacing the top mixRemoves eggs and larvae physicallyTop 1 to 2 inchesImmediateMild transplant stress
Full repotRemoves most of the populationWhole root ballImmediateReal stress; not a standalone fix

One honest note on repotting. It is the most commonly prescribed fix and it is not a guarantee. Extension services have case after case of collections that were fully repotted, with old mix dumped far away, roots washed, pots scrubbed with vinegar, and roots dipped in Bti tea, and the infestation came back anyway. The reason is that adult gnats are already in the room and re-lay eggs in the fresh, now-moist mix. Repotting plus a dry surface plus traps is what works. Repotting alone is a fresh start on the same conditions.

Fungus Gnats in Houseplants How to Fix the Soil: Improve Drainage and Watering

This is the part that decides whether the problem comes back, so it is worth more attention than any product.

  • Water by feel, not by calendar. Push a finger an inch into the mix. Water when it feels dry at that depth. If your plant needs water every Sunday, it is probably getting more than it needs.
  • Fix the pot. Every pot needs drainage holes. A decorative cachepot with no holes is a trap unless you pour the water out of it after 20 minutes, which people rarely do.
  • Empty saucers and trays. Standing water under a pot recreates the wet zone you are trying to eliminate.
  • Bottom water carefully. Pouring into a tray and letting the roots drink keeps the surface dry, which gnat adults avoid. It does not eliminate them on its own, a claim that circulates widely and does not hold up. Bottom watering on a soil that never dries is just another way to keep the larvae fed.
  • Use a coarser mix. Amend dense mixes with perlite, fine bark, pumice, or coarse sand so air stays in the mix between waterings.
  • Add a surface barrier. Half an inch of coarse horticultural sand or fine gravel keeps the top layer dry and hard to lay eggs in. The tradeoff, as one houseplant blog puts it, is that sand blocks air to the roots over time. Use it while you treat, then switch to perlite or gravel chips.

Succulents, snake plants, and other plants that want to dry out rarely get fungus gnats, which tells you how much of this is about moisture. If you cannot change the watering for a particular plant, take it out of the wet pot and move it to a gritty, fast-draining mix until you have the routine under control.

And skip the oven. Baking potting mix at 350F for an hour is advice that circulates on forums, and it is a bad idea in a domestic kitchen. It fills the house with a smell that takes weeks to clear, it kills useful organisms along with the fungus, and it does not reliably sterilize the interior of the mix. If you want to treat an unopened bag before using it, a Bti drench of the bag’s contents is safer and works better.

Fungus Gnats in Houseplants How to Fix the Soil: Control Adult Flies and Prevent Return

Adults live about a week, and a single unmated female can put up to 200 eggs down in that time. Traps reduce the number of eggs being laid, which is why they belong in the protocol even though they cannot touch the larvae.

Push yellow sticky cards into the soil near the pot rim, sticky side out, or stand them in the pot. Put one in every affected pot and one per room if the flies are roaming. Count the flies on a trap on day one and day seven to see whether the adult population is dropping. A trap that stays covered tells you the protocol is not working, because new adults are emerging from soil you have not treated.

Two traps to skip. Apple cider vinegar traps catch fruit flies, not fungus gnats, and vinegar traps sitting on the soil damage tender roots. Bug zapper lamps are worse still in a dark room full of plants, since you are killing insects you may also need. Insecticidal soap sprayed on the soil does kill adults on contact, but only the ones the spray actually lands on, so combine it with traps rather than substituting it for them.

For prevention from here on out:

  • Store opened soil sealed and dry. Bagged potting mix is a documented source of infestations, and an open bag in a humid garage or closet is an incubator. Seal the bag, keep it off a concrete floor, and buy smaller bags you can finish.
  • Quarantine new plants for 2 to 3 weeks. Put them in a separate room, check them with a sticky trap, and keep them out of the main collection until you are sure. This one habit prevents most house-wide outbreaks.
  • Inspect plants that came in from outdoors each fall before they join the others. They are a well-known entry point.
  • Clean up fallen leaves and dead stems and remove dead roots at repot time.
  • For a big collection, work outward from the worst pot. Quarantine it, treat it, and keep the traps up while you move through the rest. Treating all pots at once is much faster than treating them one at a time over three months.

Track it with a calendar. At week one, adults should be dropping on the traps and the soil surface should be drying between waterings. At week two to three, count larvae on a potato slice or in the top half inch of soil, not just flying adults. At week four to six, a fresh generation should be dying before it matures, and the count should fall. Somewhere in week six to eight the last adults age out. If week three shows the same number of flies on the traps as week one, the soil treatment is not reaching the larvae and you escalate to a full repot plus Bti.

Common Mistakes

  • Watering on a fixed schedule. A Sunday ritual keeps the top inch wet whether the plant needs it or not. Water when the top inch is dry.
  • Using a cachepot with no drainage. If the decorative pot has no holes, the inner pot sits in water all week. Change it, or drain it every time.
  • Leaving dead leaves to rot in the mix. Decaying organic matter is both the larvae’s food and the reason the surface stays damp. Pick it out.
  • Spraying only the adults. Soap and sprays reach what is flying. The larvae are in the soil, untouched, and they are the next generation.
  • Repotting into the same infested mix. Old mix back into the same pot moves the problem, it does not end it. Discard, seal, and start with fresh.
  • Expecting sticky traps alone to clear larvae. Traps are a monitoring and adult-control tool. They do nothing for what is under the surface.
  • Using neem oil as the main treatment. Neem is a contact product aimed at sap-feeders and chewing insects. Fungus gnat larvae live in wet soil where spray never lands, so neem mostly disappoints here. It is also phytotoxic on some plants in direct sun.
  • Baking soil in a kitchen oven. The smell, the ruined bake, the destroyed soil biology, and the unreliable result make this the worst-known suggestion in this topic.
  • Abandoning a working protocol at 10 days. The life cycle runs 3 to 4 weeks and generations overlap indoors. Day 10 is before the first round has had a chance to show.

A few quieter habits help more than people expect. Washing your hands and tools between pots stops you carrying larvae from an infested plant to a healthy one, and a quick potato-slice check on a new bag of mix tells you what you are about to pot into.

Frequently Asked Questions

Will replacing soil get rid of fungus gnats?

Replacing the top 1 to 2 inches of potting mix removes most eggs and larvae, and a full repot removes nearly all of them. But repotting alone does not reliably end an infestation, because adult gnats are still in the room and re-lay eggs in the new, moist mix. Pair a repot with a dry soil surface, a Bti or peroxide drench, and yellow sticky traps. Repot plus a corrected watering routine is what clears it.

How long can fungus gnats live in bagged soil?

Eggs and larvae can survive in potting mix for as long as the mix stays damp, which in a sealed bag can be weeks. That is why bagged mix, especially an open bag stored in a humid garage or closet, is a common source. Store opened soil sealed and dry, and check a slice of potato on the mix before you pot into it.

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

One generation runs about 3 to 4 weeks from egg to adult, and indoor populations overlap. A full clear usually takes 6 to 8 weeks from the day you fix the soil moisture. Adults should fall on your sticky traps within the first two weeks. If the count has not dropped by week three, the soil treatment is not reaching the larvae.

Is hydrogen peroxide good for fungus gnats?

Yes, diluted peroxide is one of the fastest soil treatments. Mix 1 part 3% hydrogen peroxide with 4 parts water and drench the moist soil. It kills larvae and adults on contact, so flies may scatter as you pour. Never apply it undiluted, and never to bone-dry soil, because both will stress or burn roots. Repeat with the next drench, not with a second application the same day.

Why is neem oil not working on fungus gnats?

Neem oil is mainly a contact treatment for insects it can wet, and fungus gnat larvae live inside damp soil where a spray never reaches. Even a soil drench of neem does not reliably kill them, and neem can burn foliage on plants in direct sun. Use Bti granules or dilute peroxide for the larvae and sticky traps for the adults instead.

Are fungus gnats harmful to humans?

Fungus gnats do not bite people and do not sting. They are a nuisance rather than a health risk for adults. The real concern is that a heavy larva load points at soil that stays wet, which is the same condition that causes root rot, plus they can spread fungal spores between pots and into your soil bags. Washing hands after handling infested mix is a sensible habit, especially with pets and small children around.

Conclusion

Start with the watering. Put the plant on a tray, pull the inner pot out, let the top inch of mix dry out completely, and stop watering on a schedule. Then strip the top 1 to 2 inches of potting mix, seal it in the bin, drench what is left with Bti tea or 1:4 peroxide, and push a yellow sticky card into the rim.

Track it weekly rather than daily. A generation takes 3 to 4 weeks and a full clear takes 6 to 8, so give the protocol that long before you decide it failed. Fix drainage, store soil sealed, and quarantine new plants for a couple of weeks, and the next batch of flies never arrives.

Leave a Comment

Identify bugs and keep pests out of your home

Read the latest guides