Those tiny black flies circling your houseplants and walking across the soil are almost always fungus gnats. The adults are harmless nuisances, but each female can lay up to 200 eggs in damp potting mix (Colorado State, Wisconsin Extension), so a few gnats turn into a cloud within weeks. The good news is that the fix is cheap and well studied. This guide explains how to get rid of fungus gnats for good, step by step, using UC IPM, Colorado State, University of Wisconsin and University of Maryland Extension, and it is honest about the popular remedies that do not work.
Is It Really Fungus Gnats?
Fungus gnats (mostly Bradysia species) are delicate, dark gray to black flies about 1/8 inch long, with long legs and antennae, that look like tiny mosquitoes (UC IPM, Colorado State). They are weak fliers: you usually see them walking on the soil, resting on leaves or flying near windows and lamps (University of Maryland Extension). Their larvae are clear to whitish, legless and worm-like with a shiny black head, and reach about 1/4 inch long (Wisconsin Extension).
| Feature | Fungus gnats | Fruit flies |
|---|---|---|
| Where you see them | On and around potted plants, the soil surface, windows | Around the kitchen, fruit bowls, drains and trash |
| Look | Slender, dark, long legs and antennae, mosquito-like | Stockier, tan body, often red eyes |
| Breed in | Moist potting mix and organic debris (UC IPM) | Fermenting fruit and food waste |
| Vinegar traps | Do not work (Wisconsin Extension) | Work well |
Sources: UC IPM Pest Notes 7448 (2013); University of Wisconsin Extension (2021); Colorado State University Extension 5.584 (reviewed 2025).
The fungus gnats vs fruit flies question matters because the fixes are different: Wisconsin Extension says the vinegar traps that catch fruit flies do not work on fungus gnats. If the flies stay near your plants and the soil, treat the plants. Maryland Extension also notes that fungus gnats can breed in drains full of moist debris, so if you see them in a room with no plants, check the sink and shower drains.
Why They Keep Coming Back: the Life Cycle
Killing the adults you can see never ends an infestation, because most of the population is underground as eggs, larvae and pupae.
| Stage | Where | How long |
|---|---|---|
| Egg | Moist soil surface, in cracks in the mix | About 3 days at 75°F (UC IPM); 3 to 6 days (Wisconsin) |
| Larva | Top 2 to 3 inches of the mix (Colorado State) | About 10 days at 75°F (UC IPM); 1 to 2 weeks (Wisconsin) |
| Pupa | In or on the soil surface | About 4 to 5 days |
| Adult | Flying and resting near the plant | Lives about 7 to 10 days; a female lays up to 200 eggs |
Sources: UC IPM Pest Notes 7448 (2013); Colorado State University Extension 5.584; University of Wisconsin Extension (2021).
UC IPM puts one full generation at about 17 days at 75°F, and Colorado State gives 3 to 4 weeks at 65 to 75°F, with breeding all year on indoor plants. Colorado State also explains why they explode in fall and winter: plants brought in from outdoors carry them inside, and soil stays wet longer in cool rooms. See our guide to bringing plants indoors for winter for how to check plants before they come in.
Do fungus gnats hurt plants?
Usually not much. The adults do not bite people or damage plants (UC IPM). The larvae feed mainly on fungi, algae and decaying organic matter, and only large numbers damage roots, mostly on seedlings and young cuttings (UC IPM, Wisconsin). UC IPM adds that a wilting plant is more often suffering from watering problems or root decay than from gnat larvae, so if your plant is wilting, read our overwatered vs underwatered guide too.
How to Get Rid of Fungus Gnats in 5 Steps
This plan attacks every stage of the life cycle at once. It is how to get rid of fungus gnats in houseplants with the methods the extension services agree on.
- Dry out the top of the soil. Wisconsin Extension calls changing soil moisture the most important step: let the top inch dry before watering. Colorado State says the top 1 to 2 inches. Empty saucers and cachepots so pots never sit in water.
- Water from the bottom. Wisconsin suggests bottom watering, which keeps moisture at the roots while the surface, where eggs are laid, stays dry. See our bottom watering guide.
- Top-dress with sand or gravel. Cover the soil with a 1/2 to 1 inch layer of coarse sand or fine gravel to keep the surface drier and less attractive for egg-laying (Wisconsin Extension).
- Trap the adults. Put yellow sticky traps near the soil or just under the leaves. Colorado State says they also help by catching egg-laying females. Wisconsin is clear that traps alone will not end an infestation, but they show you whether the plan is working.
- Kill the larvae with Bti. Products containing Bacillus thuringiensis subsp. israelensis (Bti), such as Mosquito Bits or Gnatrol, kill larvae in the soil and nothing else. Apply with enough water to soak through the mix, and repeat every 5 to 7 days (Wisconsin) or about every 5 days (UC IPM) until the gnats are gone, because Bti does not persist indoors.
Every Method Compared
| Method | Targets | Verdict |
|---|---|---|
| Letting the top 1 to 2 inches dry | Eggs and larvae | The foundation; every source recommends it |
| Sand or gravel top layer (1/2 to 1 inch) | Egg-laying | Recommended (Wisconsin Extension) |
| Yellow sticky traps | Adults | Good for monitoring and reducing egg-laying; not enough alone |
| Bti drench (Mosquito Bits, Gnatrol) | Larvae only | Effective with repeat applications every 5 to 7 days |
| Beneficial nematodes (Steinernema feltiae) | Larvae | Effective at 60 to 90°F in moist soil (UC IPM); larvae die within 3 to 4 days (Colorado State) |
| Predatory mites (Stratiolaelaps, sold as Hypoaspis) | Larvae | Used in nurseries; UC IPM says probably not effective for individual houseplants |
| Pyrethrin sprays | Adults | Temporary; does not reach larvae; Wisconsin says spray the soil surface and leaves, not the air |
| Repotting in fresh mix | All stages | Useful when old mix has broken down and stays soggy (Colorado State) |
Sources: UC IPM Pest Notes 7448 (2013); Colorado State University Extension 5.584; University of Wisconsin Extension (2021).
A note on Bti: Colorado State’s fact sheet says fungus gnat formulations are generally not sold at retail, while UC IPM and Wisconsin name Mosquito Bits, a garden-center mosquito product that also contains Bti. If you use mosquito granules, follow the label for houseplant use, and remember Bti only kills larvae, not eggs, pupae or adults (Wisconsin).
Fungus Gnat Larvae: How to Check and Kill Them
The potato test tells you whether larvae are in a pot and whether your treatment is working:
- Cut raw potato into slices or wedges about 1/4 inch thick (Colorado State).
- Press them, cut side down, onto or slightly into the soil surface (UC IPM, Colorado State).
- After 3 to 4 days (Wisconsin), turn them over. Fungus gnat larvae, tiny clear worms with black heads, will be feeding on the underside.
- Throw away infested pieces and replace them with fresh slices to keep checking (UC IPM).
Most larvae live in the top 2 to 3 inches of mix (Colorado State), which is why drying the surface and a Bti drench that soaks through that layer work so well. If a pot is full of larvae and the mix is old, compacted and soggy, repot into fresh, free-draining mix and throw the old mix away.
How to Get Rid of Fungus Gnats Naturally
You do not need chemical insecticides. The non-chemical plan above (drying, bottom watering, sand, sticky traps) is how to get rid of fungus gnats naturally, and Bti and beneficial nematodes are both biological controls: a naturally occurring bacterium and a microscopic worm that only attack insect larvae. UC IPM ranks Bti and Steinernema feltiae nematodes as the preferred options for larvae.
Other natural options people try:
- Carnivorous plants: butterworts and sundews do catch adult gnats, but they cannot reach larvae in other pots. See carnivorous plants for fungus gnats.
- Cinnamon: popular online, with little evidence. See cinnamon for plants.
- Diatomaceous earth: often suggested as a top layer, but a greenhouse study found no benefit when it was mixed into the growing medium. See diatomaceous earth for fungus gnats for the details.
Remedies That Do Not Work (or Are Unproven)
| Remedy | What the evidence says |
|---|---|
| Apple cider vinegar traps | Wisconsin Extension: vinegar traps for fruit flies do not work for fungus gnats |
| Hydrogen peroxide drench | Widely shared online, but none of the extension fact sheets used here (UC IPM, Colorado State, Wisconsin, Maryland) recommends it; Bti is the tested larval control |
| Spraying the air | Ineffective (Wisconsin); UC IPM says do not spray flying adults |
| Sprays aimed only at adults | Colorado State: they do not affect larvae in the mix, so gnats return |
| Sticky traps alone | Wisconsin: will not eliminate fungus gnats on their own |
Sources: University of Wisconsin Extension (2021); UC IPM Pest Notes 7448 (2013); Colorado State University Extension 5.584; University of Maryland Extension (2026).
How to Keep Them From Coming Back
- Water by need, not by schedule. Maryland Extension says overwatering feeds the fungi that larvae eat. Check the top inch before you water.
- Use fresh, well-drained mix. UC IPM recommends adding perlite or sand for drainage and avoiding incompletely composted organic matter. Our vermiculite vs perlite guide explains which to add.
- Store bagged potting mix closed. UC IPM advises keeping pasteurized mix in closed containers so gnats cannot lay eggs in it.
- Check plants before they come indoors in fall, and quarantine new plants for a couple of weeks.
- Watch for mushrooms and algae on the soil surface: they mean the mix stays too wet. See mushrooms in houseplant soil.
For other houseplant pests, see our guides to getting rid of spider mites and getting rid of mealybugs. Wondering whether any plant can keep bugs away? See our guide to plants that repel mosquitoes.
Frequently Asked Questions
What is the fastest way to get rid of fungus gnats?
Combine everything at once: dry the top 1 to 2 inches of soil, add yellow sticky traps for the adults, and drench the soil with Bti (Mosquito Bits or Gnatrol), repeating every 5 to 7 days. Even then, Wisconsin Extension says to expect 3 to 4 weeks, because eggs and pupae already in the soil have to hatch and die.
What causes fungus gnats in houseplants?
Constantly moist potting mix rich in organic matter. The larvae feed on fungi and decaying material in damp soil, and Maryland Extension says overwatering feeds those fungi. Infested new plants and plants brought in from outdoors are common sources (Colorado State).
Do fungus gnats bite?
No. UC IPM says adult fungus gnats do not bite people or damage plants. They are a nuisance; only large numbers of larvae can harm roots, mostly on seedlings and young plants.
Are fungus gnats the same as fruit flies?
No. Fungus gnats are slender, dark and mosquito-like and breed in moist potting soil; fruit flies are stockier and breed in fermenting fruit. Wisconsin Extension notes that vinegar traps for fruit flies do not work on fungus gnats.
Does hydrogen peroxide kill fungus gnats?
It is a popular home remedy, but none of the extension fact sheets we checked (UC IPM, Colorado State, Wisconsin, Maryland) recommends it. The tested way to kill larvae in the soil is a Bti drench or beneficial nematodes.
Why do I have fungus gnats in my house with no plants?
Maryland Extension says fungus gnats can also breed in drains with a buildup of moist debris. Cover a suspect drain with a screen or cloth for a few days to see if gnats emerge, then clean the drain and trap.
Will fungus gnats go away on their own?
Rarely while the soil stays wet, because they breed all year indoors (Colorado State). Once you let the surface dry between waterings, the larvae die and the population collapses.
Sources
- Bethke, J.A. and Dreistadt, S.H. (2013). Pest Notes: Fungus Gnats. UC IPM Publication 7448
- Cranshaw, W. and Cloyd, R.A. Fungus Gnats as Houseplant and Indoor Pests. Colorado State University Extension Fact Sheet 5.584 (reviewed 2025)
- Liesch, P.J. and Alfuth, D. (2021). Fungus Gnats on Houseplants. University of Wisconsin-Madison Extension
- University of Maryland Extension: Fungus Gnats (2026)
