Fungus gnats in houseplants: how to get rid of them
Tiny black flies around your plants and windows are almost always fungus gnats. They breed in wet potting mix, so drying the soil is the most important fix.
Quick diagnosis
In shortLet the top of the potting mix dry out between waterings, catch adults with yellow sticky traps and, for heavy infestations, water in a Bti product to target the larvae. Fungus gnats thrive in moist conditions, so overwatering keeps them coming back (UC IPM).
Does this match your problem?
- Tiny dark flies around plants or flying to windows
- Flies run across the soil surface
- Shiny slime trails on the potting mix
- Small white, legless larvae with black heads in the top of the soil
- Seedlings or young plants wilting
Safety first
- Read and follow the label on any product, and keep products away from children and pets.
- Test sprays on a few leaves first.
Tools and parts you may need
- Yellow sticky traps
- Bti larvicide (e.g. mosquito bits)
- Fresh potting mix
- Pots with drainage holes
- Soil moisture meter
Some links are affiliate links: we may earn a commission at no cost to you.
Step by step: easiest fixes first
Start at the top: the steps go from free and quick to more involved.
- Let the soil dryWater less often and let the top inch or two of potting mix dry between waterings. Empty saucers so pots don't sit in water.
- Put up sticky trapsYellow sticky traps near the soil catch adults and show you how big the problem is.
- Remove decaying matterPick up fallen leaves and old mulch from the pot surface.
- Treat the larvaeFor heavy infestations, water in a Bti product made for fungus gnats, following the label.
- Repot if it's soggyReplace waterlogged or decomposing mix with fresh potting mix in a pot with a drainage hole.
- Check new plantsInspect plants and bags of potting mix before bringing them inside.
Most common causes
| Cause | How to tell | Usual fix |
|---|---|---|
| Overwatering | Soil always damp, gnats return | Water less; empty saucers |
| Old or rich potting mix | Mix smells musty or is breaking down | Repot into fresh mix |
| No drainage | Water pools at the bottom | Use a pot with a drainage hole |
| Infested new plant or mix | Problem started after a new plant | Isolate, dry out, treat |
When to stop and call a pro
- Several plants are infested and drying out doesn't help
- Young plants or seedlings are dying
- You're not sure it's fungus gnats (fruit flies and shore flies look similar)
Questions
Are fungus gnats harmful?
Adults are a nuisance; larvae mostly eat fungi and organic matter but can chew roots, which matters most for seedlings and young plants (UC IPM).
Why do I keep getting fungus gnats?
They thrive in moist potting mix. Overwatering and poor drainage keep the cycle going (UC IPM).
Do sticky traps get rid of fungus gnats?
They catch adults and help you monitor, but you also need to dry the soil or treat the larvae.
Sources
Checked 15 Nov 2026. We may earn a commission from Amazon links.
