Getting rid of fungus gnats
Tiny black flies around your plants? They're fungus gnats. Here's the 5-step plan that breaks their life cycle — and the one habit that keeps them away.
Top photo: Fungus gnats (family Sciaridae), magnified specimens. Photo: Menzel F, Gammelmo Ø, Olsen KM, Köhler A (2020) The Black Fungus Gnats (Diptera, Sciaridae) of Norway – Part I: species records published until December 2019, with an updated checklist. ZooKeys 957: 17-104., CC BY 4.0, via Wikimedia Commons.
The short answer: Let the top 2 inches of soil dry out, put yellow sticky traps on the pots for adults, and water with BTI (sold as “mosquito bits” or “mosquito dunks”) to kill the larvae. Keep it up for 3–4 weeks.
You water your plant, and a little cloud of tiny black flies lifts off the soil. They wander across your screen, drift into your coffee, and somehow there are more every day. Meet fungus gnats.
They’re harmless to people and rarely kill a healthy plant, but they’re incredibly annoying — and they’re a sign that your soil is staying too wet.
Is it fungus gnats or fruit flies?
- Fungus gnats: tiny (1/8 inch, 2–3 mm), dark gray/black, long legs, look like mini mosquitoes. Weak fliers that hang around plant soil and windows.
- Fruit flies: tan/brown body, red eyes, hover around fruit bowls, trash and drains.
If they’re around your plants rather than your kitchen, it’s gnats.

Why you have them
Adult gnats lay eggs in moist, organic-rich soil. Larvae (tiny, clear worms with black heads) hatch and feed on fungus and decaying matter in the top couple of inches. In 3–4 weeks, they’re adults laying more eggs.
They usually arrive in a new plant or a bag of potting mix, then explode when the soil stays wet — especially in fall and winter, when plants drink less but we keep watering the same way.
The 5-step plan
You need to hit both the adults (flying) and the larvae (in the soil) at the same time, for long enough to break the cycle.
Step 1: Let the soil dry out
This is the most important step. Larvae need moist soil to survive. Let the top 2 inches (5 cm) dry completely between waterings. For many plants that’s normal anyway — most of us simply water too often. How often to really water →
Plants that need constantly moist soil (ferns, peace lilies, calatheas) can be bottom-watered: set the pot in a bowl of water for 20 minutes so the deep roots drink while the surface stays drier.
Step 2: Yellow sticky traps for adults
Stick a yellow sticky card into each affected pot, just above the soil. Adults are attracted to the color and get stuck. Traps don’t solve the problem alone, but they cut down on egg-laying — and they show you if your treatment is working (fewer new gnats each week).
Step 3: Kill the larvae with BTI
BTI (Bacillus thuringiensis israelensis) is a natural soil bacterium that kills fly larvae (mosquitoes, gnats) and is considered safe around people, pets and plants. It’s sold as “mosquito bits” or “mosquito dunks” at garden centers and hardware stores.
How to use it: soak mosquito bits in your watering can (about 1–2 tablespoons per gallon / 4 liters) for 30 minutes, then use that water every time you water for 3–4 weeks.
Step 4: Optional hydrogen peroxide drench
For a quick knock-down, mix 1 part 3% hydrogen peroxide with 4 parts water and water the plant with it when the soil is dry. It fizzes and kills larvae on contact, then breaks down into water and oxygen. Don’t overdo it — once or twice is enough, and skip it on delicate cuttings and seedlings.
Step 5: Repeat for a full month
Eggs keep hatching for weeks. Keep the soil dry on top, replace sticky traps when they’re full, and keep using BTI water for 3–4 weeks, even after you stop seeing gnats.
Other things that help
- Top layer of sand or fine gravel: a half-inch layer on top of the soil makes it hard for adults to lay eggs.
- Remove dead leaves from the soil surface — they’re gnat food.
- Check new plants before bringing them home. Look for larvae by placing a slice of raw potato on the soil for a few hours: if larvae are present, they’ll be on the underside.
- Store potting mix sealed, and let the bag dry out if it’s soggy.
- Apple cider vinegar traps (a bowl of vinegar with a drop of dish soap) catch some adults, but sticky traps work better for gnats.
What doesn’t work well
- Cinnamon on the soil: may reduce fungus a little, but won’t stop an infestation.
- Repotting into fresh soil alone: works only if you also dry out the soil and treat — otherwise survivors move right in.
- Bug sprays aimed at the air: you’ll kill a few adults while hundreds of larvae keep growing below.
The life cycle, and why one treatment never works
Fungus gnats go from egg to egg-laying adult in roughly 3–4 weeks at room temperature. At any moment, your pot holds every stage at once:
| Stage | Where | Roughly how long | What kills it |
|---|---|---|---|
| Eggs | Top inch of moist soil | A few days | Letting the top 2 inches dry |
| Larvae | Top 1–2 inches of soil, near roots | About 2 weeks | Dry topsoil, BTI water, hydrogen peroxide drench |
| Pupae | Just below the surface | Several days | Dry topsoil |
| Adults | Flying around the pot and windows | About a week | Yellow sticky traps |
That’s why the plan runs for a full month: a single spray kills the adults you can see, while next week’s adults are already growing in the soil.
Which treatment for which situation
| Method | Targets | How fast | Notes |
|---|---|---|---|
| Let the topsoil dry | Eggs, larvae, pupae | 1–2 weeks | Free and the most important step |
| Yellow sticky traps | Adults | Immediate | Shows you if the treatment is working |
| BTI (“mosquito bits”) in the watering can | Larvae | Days | Works only if it reaches the soil every watering for 3–4 weeks |
| Hydrogen peroxide (1 part 3% : 4 parts water) | Larvae | Immediate | Use once or twice; skip on cuttings and seedlings |
| Sand or fine gravel top layer | Egg-laying | Ongoing | Prevention, not a cure |
| Repotting into fresh mix | All soil stages | Immediate | Only helps if the new soil is kept drier |
| Neem or bug sprays aimed at the air | A few adults | — | Little effect: the problem lives in the soil |
Gnats from a new bag of potting mix
Bags stored outside or in a damp garage can arrive with gnats already inside. If adults fly out when you open a bag:
- Keep the bag closed and dry — larvae need moisture.
- Use it for plants you’ll bottom-water, so the top stays drier.
- Or spread the mix on a tray in the sun for a day before using it.
- Next time, buy from a store that keeps bags indoors and store them sealed.
When it’s not fungus gnats
| Flies near… | Probably | What to do |
|---|---|---|
| Plant soil, windows | Fungus gnats | This guide |
| Fruit bowl, trash, compost bin | Fruit flies | Remove ripe fruit, cover trash, vinegar trap |
| Bathroom or kitchen drain | Drain flies (fuzzy, moth-like wings) | Clean the drain |
| Very wet soil, algae on top of the pot | Shore flies (stockier, dark wings with pale spots) | Same as gnats: let the soil dry |
Mistakes that keep gnats around
- Treating only the plant that has flies — larvae are probably in the pots next to it too. Treat the whole group.
- Stopping after a week because the adults are gone.
- Self-watering pots and saucers that keep the bottom of the pot permanently wet while you dry the top.
- Decorative moss on top of the soil: it stays damp and hides larvae.
Are fungus gnats a sign of root rot?
Not by themselves, but they share a cause: soil that stays wet. If you have gnats and the plant shows soft yellow leaves, a sour smell or mushy stems at the soil line, check the roots. Slide the plant out of the pot: white, firm roots mean you only have a gnat problem; brown, mushy roots mean you need to trim the rot and repot into fresh, dry mix before treating the gnats. How to tell overwatering from thirst →
Keep them from coming back
Fungus gnats are really a watering problem. Once you water only when the top of the soil is dry, use pots with drainage holes and empty saucers, they have nowhere to breed. If you also see yellow leaves, it’s very likely the same cause — here’s how to tell.
Plants in this guide
Quick answers
Do fungus gnats bite people or pets?
No. Adult fungus gnats don't bite or sting. They're a nuisance and, in large numbers, the larvae can damage seedlings and cuttings.
Why do I only get fungus gnats in winter?
Plants use less water in the short days of winter, so soil stays wet much longer if you keep watering at the summer pace. Wet topsoil is exactly what gnat larvae need.
Are fungus gnats harmful to plants?
The adults are just annoying. The larvae live in the soil and mostly eat fungus and decaying matter, but large numbers can nibble roots and harm seedlings and cuttings.
Does cinnamon get rid of fungus gnats?
Cinnamon has mild antifungal properties and may slightly reduce the fungus larvae feed on, but it won't solve an infestation alone. Drying the soil and using sticky traps and BTI works much better.
How long does it take to get rid of fungus gnats?
About 3–4 weeks. Their life cycle is roughly 3–4 weeks, so you need to keep treating long enough to catch every generation as it hatches.
Sources
- UC IPM (University of California) — Fungus Gnats
- U.S. EPA — Bti for Mosquito Control
- UF/IFAS Gardening Solutions — Houseplants
Checked November 9, 2026. Spotted an error? Tell us — see our editorial policy.
Pin it to your plant board so you can find it when you need it.
Save to PinterestKeep reading
More Plant Problems →
Overwatered or underwatered?
Both make leaves droop and turn yellow. Check the soil, the leaf texture and the roots to tell overwatering from underwatering — and fix each one.
Plant Problems

Why pothos leaves turn yellow
Yellow pothos leaves are a message. Learn to read the pattern — soft, crispy, old or new leaves — and fix overwatering, light, roots and more.
Plant Problems

Brown tips on leaves
Crispy brown tips are usually dry soil, dry air, or salts and fluoride in tap water. How to tell which one by the pattern, and which plants are most sensitive.
Plant Problems


