How to get rid of fungus gnats
By Muzamil Ali · Last updated
How to get rid of fungus gnats: dry the top inch of soil, trap the adults, and drench with Bti every 5–7 days to break the cycle in 3–4 weeks.
Tiny black flies rise from the pot every time you water, settle on the soil, and drift toward the window. If that sounds familiar, you are dealing with fungus gnats, and learning how to get rid of fungus gnats starts with one uncomfortable fact: the flies you see are not the problem. The problem is underground. Adult fungus gnats do not damage plants at all. Their larvae, feeding in the top inches of damp potting mix, are what chew root hairs and stunt seedlings. Kill the adults and the next generation is already hatching. This guide covers how to get rid of fungus gnats the way university extension services recommend — by drying the soil, trapping the adults, and treating the larvae — so the cycle actually ends instead of restarting every few weeks.
What are fungus gnats?
Fungus gnats are small, dark, delicate flies in the family Sciaridae, commonly associated with overwatered houseplants. The University of Wisconsin-Madison Extension describes the adults as dark brown or black flies approximately 1/8 inch long, with dark, translucent wings that fold on their backs at rest. Their wings carry a distinct rounded Y-shaped set of veins near the tips, visible with a magnifying glass — the feature that separates them from fruit flies, which they are often mistaken for. UC IPM gives a similar size range, about 1/16 to 1/8 inch long, and notes that fungus gnats are relatively weak fliers that usually stay near their potted plants, running across the growing media, foliage, and soil surface.
The larvae look nothing like the adults. They are pale, worm-like maggots with a shiny black head, about 1/4 inch long when mature, according to the Wisconsin Extension. They live in the top layers of moist potting mix, feeding on fungi, decaying organic matter, and — when their numbers are high — on fine roots. That diet is the key to how to get rid of fungus gnats: a pot that stays damp and rich in organic matter is both a pantry and a nursery for them. Adults, by contrast, are a cosmetic nuisance. Wisconsin Extension is blunt about it: adult fungus gnats do not feed on or damage plants. If your plant is wilting, UC IPM cautions, too much or too little water and root decay are much more common causes than fungus gnats — but a heavy larval population can still stunt growth, especially in seedlings and young plants.
The fungus gnat life cycle, and why it defeats quick fixes
Fungus gnats go through four stages — egg, larva, pupa, and adult — and indoors those stages overlap, so eggs, larvae, pupae, and adults are all present in a pot at the same time. A female lays up to 200 eggs in clusters in cracks and crevices on the surface of moist soil, per Wisconsin Extension. The eggs typically hatch within three to six days. The larvae pass through four stages over one to two weeks, then pupate near the soil surface, and adults emerge about four to five days later. Adults live only about a week. Under optimal conditions, the whole journey from egg to adult takes three to four weeks.
UC IPM gives a tighter set of numbers at a warm indoor temperature: at 75°F, eggs hatch in about 3 days, larvae take approximately 10 days to develop into pupae, and adults emerge about 4 days after that — a generation of about 17 days from female to female. The warmer it is, the faster they develop and the more generations are produced in a year.
| Stage | Timing (Wisconsin Extension) | Timing (UC IPM, at 75°F) |
|---|---|---|
| Eggs | Hatch in 3–6 days | Hatch in about 3 days |
| Larvae | 1–2 weeks, four stages | About 10 days |
| Pupae | Adults emerge 4–5 days after pupae form | Adults emerge about 4 days later |
| Adults | Live about 1 week | Short-lived; generation about 17 days |
| Egg to adult | 3–4 weeks under optimal conditions | About 17 days at 75°F |
That overlap is why a single weekend of effort never works. Spray the adults on Saturday and the larvae in the soil keep developing. Dry the soil for three days and the pupae already in the pot still emerge as adults. Any plan for how to get rid of fungus gnats has to run long enough to outlast a full generation — three to four weeks — and it has to attack more than one stage at once.
Step 1: Dry the soil surface
Wisconsin Extension calls altering the plant's environment the single most important step in managing fungus gnats, and the change it recommends is simple: keep the soil surface dry to eliminate favorable egg-laying sites. Allow the top inch of the soil to dry out before you water. UC IPM gives the same advice in slightly different words: allow the surface of container soil to dry between waterings, and avoid overwatering in general.
Put that into practice by changing how, not just how often, you water:
Watering changes that keep the surface dry
- Check before you water. Push a finger into the top inch of mix. If it feels damp, wait. Most houseplants tolerate a dry top inch without any trouble — the roots deeper in the pot are still moist.
- Empty the saucer. Standing water under a pot keeps the bottom of the mix wet and invites gnats back. UC IPM lists cleaning up standing water among its first management steps.
- Water from the bottom for moisture-loving plants. Wisconsin Extension offers this as an alternative: bottom watering gives moisture to the roots while keeping the soil surface dry. Set the pot in a saucer of water, let the roots take what they need, then tip away whatever remains.
- Improve drainage at repotting time. UC IPM recommends increasing the proportion of perlite or sand in the mix to improve drainage, since gnats thrive in moist, poorly drained media. Our perlite vs vermiculite guide explains which amendment suits which plant, and our potting soil calculator sizes the batch so you mix the right amount.
One caution: drying the surface is not the same as drying the whole pot. A plant that wilts and stays wilted needs water. The target is a dry top inch, not a bone-dry root ball — and that dry top inch is the foundation of how to get rid of fungus gnats, because without it females keep laying eggs no matter what else you do.
Step 2: Trap the adults and monitor the larvae
While the soil dries, the next step in how to get rid of fungus gnats is to set traps. Yellow sticky traps, placed near the plant's leaves or just above the soil on small stakes, catch the egg-laying adults. Wisconsin Extension notes that the traps are inexpensive, easy to use with potted plants, and useful twice over: they reduce the adult population and they let you track the number of gnats over time, so you can see whether your watering change is working. UC IPM adds a practical detail: the traps can be cut into smaller squares, attached to wooden skewers or sticks, and placed in pots.
Traps alone will never finish the job, because they catch no larvae. But they cut the next round of eggs, and a falling weekly trap count is the clearest sign the infestation is shrinking. Keep fresh traps up for the whole three-to-four-week plan for how to get rid of fungus gnats, not just the first week.
To check what is happening underground, use the potato-slice test that both extension services recommend. Place chunks of raw potato on the soil surface, cut sides down. Larvae in the soil come to the surface to feed on the potato tissue. Wisconsin Extension says to check the slices for maggots after three to four days; UC IPM notes that infested chunks can be removed, disposed of, and replaced with fresh ones, which also traps some larvae away from the roots. If the slices keep coming up covered in larvae after two weeks of drier soil, move to step 3.
Step 3: Drench the soil with Bti
When drying and trapping are not enough on their own, the next stage of how to get rid of fungus gnats is the biological treatment both extension services recommend: Bti — Bacillus thuringiensis subspecies israelensis, a naturally occurring bacterium sold to homeowners as products such as Gnatrol and Mosquito Bits. UC IPM describes Bti as toxic only to fly larvae, such as mosquitoes, black flies, and fungus gnats, and notes that these biological materials are essentially nontoxic to people.
Bti works only on larvae, and that limitation shapes how you use it:
- It does not touch eggs, pupae, or adults. Wisconsin Extension states this directly, and it is the reason a single application disappoints: the adults keep flying, the pupae keep emerging, and the eggs keep hatching.
- Repeat it. Wisconsin Extension advises several applications spaced five to seven days apart to control newly hatched larvae until the infestation is under control. UC IPM gives a similar interval — repeated applications at about five-day intervals — and explains why: Bti does not reproduce or persist indoors, so each round only covers the larvae feeding at that time.
- Water it in properly. Wisconsin Extension advises applying Bti products with adequate water to help the bacterium filter through the soil to reach the larvae. Follow the product label for rates, and use it as your watering water on treatment days rather than as a light surface sprinkle.
- Keep the traps up. Since Bti leaves the flying adults untouched, the yellow sticky traps from step 2 are what stop those adults from laying the next batch of eggs while the Bti works through the larvae.
If Bti is not available
If Bti is not available, UC IPM names a second biological option for how to get rid of fungus gnats: Steinernema feltiae nematodes, which actively hunt gnat larvae in moist soil and work between 60° and 90°F. They are live, perishable products that must be applied promptly after arrival, and they are usually mail-ordered rather than picked up at a garden center. UC IPM also notes that predatory Hypoaspis mites probably will not perform very well in individual houseplants, so they are not a good first choice for a home collection.
Step 4: Block the surface and clean up
Two more habits finish how to get rid of fungus gnats at the pot level: they make the pot a worse place for gnats to breed. First, cover the soil with a 1/2 to 1 inch layer of coarse sand or fine gravel. Wisconsin Extension recommends this layer because it helps keep the surface drier and makes the soil less attractive for egg-laying, and it pairs the layer with the three-to-four-week timeline: modified watering plus sand or gravel is what gets gnats in check. The layer is not a cure on its own — larvae already in the mix still need the drying and Bti steps — but it closes the front door for new females.
Second, clean up the debris the larvae feed on. UC IPM advises removing organic debris around plants and avoiding incompletely composted organic matter in potting media, since moist, decomposing material is a favorite breeding spot. Pick dead leaves off the soil surface, do not let fallen leaves rot on top of the mix, and when you repot, use only pasteurized container mix. Our how much potting soil a container needs guide helps you buy the right amount so a half-open bag is not sitting around collecting gnats itself.
How to get rid of fungus gnats in three to four weeks
Putting the steps together, here is how to get rid of fungus gnats on a schedule that matches the insect's life cycle. Treat the weeks as a plan, not a promise: a light infestation may clear sooner, and a heavy one in a warm room may need an extra round of Bti.
| Week | What to do |
|---|---|
| Week 1 | Let the top inch of soil dry before every watering. Empty saucers. Put yellow sticky traps in every affected pot and potato slices on the soil to check for larvae. Remove dead leaves from the surface. |
| Week 2 | Keep the surface dry; switch moisture-loving plants to bottom watering. Check the traps: the count should start falling. Replace potato slices. Add a sand or gravel layer if the surface is still attracting females. |
| Week 3 | If the slices still show larvae or traps are still filling, start Bti drenches, watering them well into the mix. Keep traps up to catch the adults Bti cannot kill. |
| Week 4 | Repeat Bti if larvae are still present. Trap counts should now be low. Keep the drier watering habit — it is also the prevention step that stops the next infestation. |
Seedlings deserve special attention in this plan, because UC IPM singles them out: larvae damage roots and stunt growth particularly in seedlings and young plants. If you are raising seedlings, the drying step matters even more, and a pot that keeps producing gnats despite treatment may be worth discarding rather than nursing along. Our how to start seeds indoors guide covers the containers, light, and timing that keep seedlings vigorous enough to outgrow minor root damage.
What not to do
A few popular remedies waste time in any plan for how to get rid of fungus gnats, and extension sources are clear about them:
- Do not rely on vinegar traps. They are fruit-fly traps. Wisconsin Extension states that vinegar traps and other methods commonly used for fruit flies do not work for monitoring fungus gnats. A jar of vinegar on the counter catches almost nothing that matters here.
- Do not chase only the adults. Sprays aimed at flying gnats miss every stage that actually sustains the infestation. UC IPM notes that the most effective control methods target the immature stages in the soil rather than the mobile, short-lived adults, and that insecticides are generally not recommended for fungus gnat management in and around the home.
- Do not reach for insecticide first. Wisconsin Extension says that unless an infestation is severe, chemical controls are not warranted, and even then they should never be the sole approach. If adult numbers are excessive, pyrethrin products labeled for indoor houseplant use can give temporary control, but they must be combined with the drying, trapping, and Bti steps above.
- Do not keep overwatering while treating. Every other step is undermined by a pot that never dries. If the schedule that caused the gnats stays in place, the gnats will too.
Preventing the next infestation
Once the traps are empty, the habits that ended the infestation — the same habits at the heart of how to get rid of fungus gnats — are the ones that prevent the next one. Buy pasteurized potting mix and store it off the ground in closed containers, as UC IPM recommends, so a fresh bag does not arrive already infested. Inspect plants carefully before buying them, and inspect houseplants that spent the summer outdoors before bringing them back inside — Wisconsin Extension notes that gnats are often more of a problem in the fall, when infested outdoor plants come back indoors. Quarantine a new or suspect plant away from the rest of the collection until its traps stay clean for a week or two. And keep watering on the finger test, not on a calendar: a top inch that dries between waterings is inhospitable to egg-laying females in every season, which is why that one habit is the long-term answer to how to get rid of fungus gnats, both as treatment and as prevention.
Fungus gnats are a moisture problem wearing an insect costume. That is how to get rid of fungus gnats: dry the surface, trap the adults, treat the larvae with Bti, and give the plan three to four weeks — and the flies that rose from the pot this morning will have nowhere left to breed.
Sources
- University of Wisconsin-Madison Extension — Fungus Gnats on Houseplants (adult and larva size, egg numbers and timing, top-inch drying, bottom watering, sand and gravel layer, sticky traps, potato slices, Bti intervals, vinegar traps, chemical control)
- UC IPM, University of California Statewide IPM Program — Fungus Gnats (identification, damage to seedlings, life cycle at 75°F, surface drying and drainage, sticky traps and potato chunks, Bti persistence and intervals, Steinernema feltiae, Hypoaspis limitation, pasteurized mix, insecticide guidance)