Fungus Gnats in Houseplants: How to Get Rid of Them for Good

They rise off the soil every time you water. They drift across your laptop screen, land in your coffee, and hover around every pot on the shelf like they pay rent. Fungus gnats are the most annoying houseplant pest precisely because they seem unkillable: swat a dozen today, and a dozen more hatch tomorrow.
The reason they keep coming back is that the flies you see are only the last chapter of the story. How to get rid of fungus gnats for good is not an air war against the adults — it is a four-week campaign in the soil, where the eggs and larvae actually live. This guide gives you the identification checks first (two common look-alikes need different treatment), then the plan, in order.
Quick Answer
How to get rid of fungus gnats: work in the soil, on three fronts at once. Let the top 1–2 inches of soil dry between waterings so eggs and young larvae die off; hang yellow sticky traps at soil level to catch egg-laying adults; and water with Bti (sold as mosquito bits or dunks) once a week for four weeks to kill the larvae. Adults live about a week — end the breeding, and the flies end with it.
Table of Contents
First, confirm it is really fungus gnats
Two other tiny flies are constantly mistaken for them, and the treatments differ:
- Fungus gnats are delicate, dark, mosquito-like flies, about 2–4 mm, that walk on the soil surface and fly weakly around pots and windows. Their home is your potting mix.
- Fruit flies are chunkier and tan-brown with red eyes, and they gather around fruit, compost, and drains — not plant soil. They need a kitchen fix, not a plant fix.
- Drain flies are moth-like and fuzzy, appearing around sinks and shower drains. Their larvae live in drain slime, not pots.
Two quick tests settle it. The trap test: set a yellow sticky trap flat at soil level for a day or two — fungus gnats walking the soil will be all over it. The potato test: press a raw potato slice, cut side down, onto the soil overnight; fungus gnat larvae — tiny translucent worms with shiny black heads — gather underneath it to feed. Larvae confirmed means the breeding is in that pot.
Why they keep coming back: the life cycle runs the show
A fungus gnat’s whole life takes about three to four weeks at room temperature, and nearly all of it is hidden. The adult female lays her eggs — up to a couple of hundred — in moist potting soil. Eggs hatch in a few days into larvae that live in the top couple of inches of mix for roughly two weeks, feeding on fungi, decaying matter, and fine root hairs. Then they pupate, emerge as adults that live about a week, and lay the next round of eggs.
That math explains every failed attempt. Spraying or swatting adults removes the one stage that was about to die anyway, while eggs and larvae wait untouched in the soil. And a single soil treatment misses the eggs, which hatch days later. Any real plan must (a) hit the larvae repeatedly as eggs hatch, and (b) run for at least four weeks — one full generation — or the last eggs restart the whole thing just as you declare victory.
The adults themselves are mostly a nuisance. It is the larvae that can matter: on established plants they are usually harmless grazers, but in numbers they chew root hairs and can genuinely damage seedlings, cuttings, and already-stressed plants. They are also a symptom worth reading: fungus gnats thrive in soil that stays wet, and the same constantly wet soil behind pothos leaves turning yellow is what breeds them — treat the gnats and you are usually treating an overwatering habit too.
The 4-week plan
Step 1: Dry the surface — the foundation (start today)
Eggs and young larvae need moist soil; a dry surface is hostile ground where females also lay fewer eggs. From today, let the top 1–2 inches of every affected pot dry out fully before you water again. During the campaign, water from below where you can — stand pots in a tray for 20–30 minutes so the roots drink while the surface stays dry — and always empty saucers and cover pots afterward. This step alone, held for a few weeks, collapses most light infestations; every other step works better on top of it.
Step 2: Trap the adults — break the egg-laying (start today)
Put yellow sticky traps in every affected pot, staked just above the soil or laid flat on the surface — fungus gnats fly low and walk the soil, so soil-level traps catch them before they lay. Replace traps as they fill, and count the weekly catch: a falling count is your evidence the plan is working, and a stubborn count tells you a pot somewhere is still breeding. Traps will not end an infestation alone — they cannot touch the larvae — but every female caught is a couple of hundred eggs not laid.

Step 3: Bti for the larvae — the decisive treatment (weekly, 4 weeks)
Bti — Bacillus thuringiensis subspecies israelensis — is a naturally occurring soil bacterium whose proteins kill fly larvae, and it is the larvicide university extension services name first for fungus gnats in pots. It is sold for mosquitoes as bits, dunks, and granules, and it targets mosquito and fungus gnat larvae specifically: it does not harm plants, pets, people, or beneficial insects.

Use it as a tea: steep the bits in your watering can for about 30 minutes, strain out the granules if you like, and water your plants with the cloudy water so it soaks the top layer of soil where the larvae feed. Repeat every 5–7 days for at least four weeks — Bti does not persist in the pot and does nothing to eggs or pupae, so the repeats are what catch each new hatch. Mark the four dates on a calendar the day you start; the plan fails by forgetting, not by chemistry.
Step 4: Cap the soil — shut the nursery door (once)
A half-inch layer of coarse horticultural sand or fine grit on the soil surface dries almost instantly after watering, blocks females from reaching the mix to lay eggs, and stops larvae from surfacing. It is the physical version of Step 1 and a good permanent finish for your worst offender pots. Keep it dry-ish by bottom-watering during the campaign.

Step 5: Clean the sources — remove the reinforcements (once)
Check the overlooked breeding grounds: saucers holding standing water, a forgotten propagation tray, decaying leaves sitting on soil, and any pot whose plant has died but whose wet mix remains. Bag and bin infested dead material. If one plant is swarming far beyond the others — usually the wettest pot — repot it: shake off most of the old mix outdoors, trim any rotted roots, and replant in fresh mix. That single pot is often the reservoir keeping the whole shelf supplied.
What does not work (or only half-works)
- Apple-cider-vinegar traps catch fruit flies. Fungus gnats largely ignore them — a full vinegar trap next to swarming pots means you have the wrong fly or the wrong tool.
- Spraying the adults with anything: satisfying for a day, irrelevant by the weekend. The soil holds the next three weeks of gnats already.
- Hydrogen peroxide drenches and cinnamon are the internet’s favorites. A peroxide drench can kill some larvae on contact, but extension services do not rate it a primary control — it flashes off in minutes and spares the eggs. Use it as a supplement if you like, never as the plan.
- Insecticides for the room are overkill for a pest that drying soil defeats; chemical controls are rarely justified indoors for fungus gnats.
Keeping them out for good
- Water on need, not on schedule, and let the surface dry between drinks — prevention is Step 1, forever.
- Quarantine new plants for a week or two and check their soil before they join the shelf; most infestations arrive in a new pot.
- Empty saucers and cover pots after every watering; standing water is an open nursery.
- Keep a couple of sticky traps permanently in your most-loved pots as an early-warning system — a sudden catch means check the watering before it becomes a swarm.
The University of California’s IPM program covers fungus gnats in the same terms as this guide — dry the soil surface, trap the adults, and go after the larvae with Bti.
Fungus gnat questions, answered
Are fungus gnats harmful to my plants?
The flying adults are not — they do not bite, feed on leaves, or spread disease around your home. The larvae are the stage to respect: they graze on fungi and organic matter in the soil and, in large numbers, on fine root hairs, which can stall or kill seedlings and cuttings and stress a plant already struggling with wet soil. A healthy, established plant usually tolerates a light population without visible harm — but the wet soil that breeds gnats is harming it anyway.
How long does it take to get rid of fungus gnats completely?
Plan on four weeks of consistent treatment — one full life cycle — before traps come up nearly empty. Light infestations sometimes quiet down in two to three weeks on drying alone; heavy ones can take five to six. The calendar, not the fly count on day three, is the measure: stopping at week two because “they look gone” is how the last eggs restart the swarm.
Do yellow sticky traps get rid of fungus gnats on their own?
No. Traps catch adults only, and adults are the shortest-lived stage — meanwhile the soil keeps producing them. What traps do brilliantly is monitoring (you can see whether numbers rise or fall week to week) and reducing egg-laying pressure while the soil treatments do the killing. Trap plus dry surface plus Bti is a plan; a trap alone is a scoreboard.
Is Bti safe to use around pets and children?
Yes. Bti’s proteins target the gut of fly and mosquito larvae specifically, which is why the same products are approved for treating drinking-water storage and animal water for mosquitoes, and why extension services recommend it for indoor pots. It does not affect people, pets, birds, or beneficial insects. As with any product, follow the label — the safety record belongs to using it as directed.
Why did fungus gnats suddenly appear in my home?
Usually one of three arrivals: a new plant carried eggs or larvae in its mix; the weather turned and watering habits did not (soil drying more slowly in cool, dark weeks stays wet longer); or a plant began struggling and its wetter, decaying root zone became prime breeding ground. Work out which one happened, because the answer is your prevention plan — quarantine, seasonal watering adjustment, or a plant rescue.
Can fungus gnats live in my drains or come from outside?
Fungus gnats breed in moist soil and decaying organic matter — your pots, not your plumbing. The flies around a sink are usually drain flies or fruit flies, which need their own fixes. Gnats can drift in from outdoors in summer, but an indoor population that persists through winter is breeding indoors, in soil, and that is where the plan above goes to work.
4 Comments