Fungus Gnats: How to Get Rid of Them
Get rid of fungus gnats by breaking their life cycle: dry the top 2.5–5 cm of soil, find larvae with potato slices, trap adults and treat with Bti.

To get rid of fungus gnats, stop them breeding in the soil. Let the top 2.5–5 cm (1–2 in) of potting mix dry between waterings, empty saucers, catch adults on yellow sticky traps and, for stubborn pots, water in a Bti product labelled for fungus gnats every 5–7 days. Expect it to take 3–4 weeks.
Key takeaways
- Fungus gnats breed in wet potting mix; their larvae live in the top 5–8 cm (2–3 in).
- Letting the top 2.5–5 cm (1–2 in) dry between waterings is the most important step.
- Potato slices show which pots have larvae; yellow sticky traps catch the adults.
- Bti and Steinernema nematodes kill larvae; sprays only kill adults for a short time.
- Expect 3–4 weeks of drier watering to clear an autumn or winter infestation.
Why do I have fungus gnats in my houseplants?
Fungus gnats are the small dark flies that rise from a pot when you water it or walk past. To get rid of fungus gnats you have to stop them breeding in the potting mix, because the flies you see are only the last stage of a cycle that happens in wet soil. Colorado State University Extension says the larvae live in the top 5–8 cm (2–3 in) of the mix and feed mainly on fungi, algae and decaying organic matter, with some feeding on roots. This guide adds what most advice skips: a table of which method hits eggs, larvae or adults.
Gnat numbers often peak in autumn and winter. Colorado State explains why: plants brought in after a summer outdoors carry them inside, and lower light and slower growth keep the mix wet for longer.
How to tell fungus gnats from other small flies
- Fungus gnats: delicate, dark, mosquito-like flies about 1.5–3 mm (1/16–1/8 in) long, with long legs and long antennae (UC IPM). They are weak, erratic fliers and often gather at windows. With a magnifier you can see a Y-shaped vein near the wing tip.
- Shore flies: also found around wet pots, but sturdier, with short, bristle-like antennae (UC IPM).
- Whiteflies: tiny white insects that flutter up from the undersides of leaves rather than from the soil (Iowa State Extension).
The larvae are the stage you rarely notice: legless, whitish to clear, up to about 6 mm (1/4 in) long, with a shiny black head. UC IPM notes that they can leave slime trails on the soil surface.
Do fungus gnats harm plants?
Usually not much. The adults do not bite or feed on plants. Iowa State Extension says fungus gnats cause little direct damage but are a sign of overwatering. Larvae can damage roots and stunt seedlings and young plants, and UC IPM says very high numbers in moist, organic mix can kill houseplants. It also points out that a wilting plant is more often suffering from over- or underwatering, root rot or poor drainage than from gnats. If the plant wilts while the soil is wet, check the roots with our root rot rescue plan before you blame the gnats.
Step 1: find the pots they breed in (the potato test)
Sticky traps tell you there are adults; a potato tells you which pots have larvae. Cut raw potato into slices about 6 mm (1/4 in) thick and press them into the surface of each suspect pot. Colorado State says larvae move to the slices and start feeding within a few days. After 3–4 days, turn each slice over and look for small translucent larvae with black heads (University of Wisconsin–Madison Extension). Replace the slices to keep checking. Pots with larvae get the full treatment below; clean pots only need the drier routine.
Which method works on which stage?
The fungus gnat life cycle is quick. UC IPM says that at 24 °C (75 °F) eggs hatch in about 3 days, larvae pupate after about 10 days and adults emerge about 4 days later, so a generation takes about 17 days. Colorado State gives 3–4 weeks at 18–24 °C (65–75 °F) and says each female can lay up to 200 eggs. Generations overlap, so every stage is in the pot at once, which is why one method alone rarely clears them.
| Method | Stage it hits | How to use it |
|---|---|---|
| Let the top of the mix dry | Eggs and young larvae; also puts egg-laying females off | Dry the top 2.5–5 cm (1–2 in) between waterings; empty saucers |
| Coarse sand or fine gravel on top | Egg-laying | A 1–2.5 cm (1/2–1 in) layer keeps the surface drier |
| Yellow sticky traps | Adults, especially females | Small squares on sticks just above the soil; they also show whether numbers fall |
| Bti (Bacillus thuringiensis subsp. israelensis) | Larvae only | Water it into the mix every 5–7 days until the gnats stop |
| Steinernema feltiae nematodes | Larvae | Drench into moist mix at 16–32 °C (60–90 °F); use soon after delivery |
| Pyrethrin spray labelled for houseplants | Adults only, short term | Last resort; apply to the plant and soil surface, never into the air |
Step 2: change how you water
Wisconsin Extension calls changing the growing conditions the single most important step. Let the top 2.5–5 cm (1–2 in) of mix dry before you water again, empty saucers and decorative pot covers, and fix anything that leaves water standing. Watering from below, by standing the pot in a tray of water for a while, keeps the surface drier (Wisconsin Extension). If you are unsure how to judge when a pot needs water, our guide on how to water houseplants shows the finger and pot-weight checks. Wisconsin notes that an autumn infestation can take 3–4 weeks of this drier routine to clear, so do not give up after one week.
Step 3: trap the adults and treat the larvae
- Sticky traps. Cut yellow sticky cards into small squares and mount them on skewers just above the soil (UC IPM). Colorado State notes that catching egg-laying females reduces the next generation. A falling catch means the plan is working.
- Top-dress the worst pots. Add 1–2.5 cm (1/2–1 in) of coarse sand or fine gravel over the mix.
- Bti for stubborn pots. Bti is a bacterium that is toxic only to fly larvae. Wisconsin advises applying it with enough water to reach the larvae and repeating every 5–7 days, because it does not affect eggs, pupae or adults. Extension sources differ on how easy it is to find in shops, so you may need to order it. Choose a product whose label covers fungus gnats.
- Nematodes for larger collections. UC IPM names Steinernema feltiae as the most effective species, and Colorado State says infected larvae die within 3–4 days. They are usually mail-order and must be used quickly.
Whatever product you choose, start with the least toxic option and follow the label for dose, timing and safety.
Fungus gnat remedies that do not work
- Vinegar or fruit-fly traps. Wisconsin Extension says the vinegar traps used for fruit flies do not work for fungus gnats.
- Spraying the air. Killing flying adults does nothing to the larvae in the soil. UC IPM advises against fogging indoors or spraying flying adults.
- Insecticide as the only fix. UC IPM says insecticides are rarely needed around homes, and Wisconsin says they should only be used alongside the drier routine.
- Raw compost or manure in the pot. UC IPM warns that incompletely composted matter and excess manure or blood meal attract gnats. Use pasteurised bagged potting mix.
When to repot, and when to give up on a pot
Old potting mix that has broken down holds too much water. Colorado State suggests repotting when the mix has decomposed and removing containers with rotting bulbs or roots. If you repot, use fresh pasteurised mix, keep the bag closed and off the floor, and follow our steps for repotting without stress. UC IPM advises discarding severely infested plants and not carrying infested pots to other rooms, where emerging adults spread. Mushrooms in the same pot also mean the mix stays wet; see mushrooms growing in a houseplant pot.
How to keep fungus gnats from coming back
Gnats usually arrive with a new plant or a bag of mix. Keep new and returning plants apart for a few weeks and check the soil surface as part of the weekly routine in our natural pest prevention guide. Leave one sticky trap in each pot that had gnats as an early warning. If you are not sure whether the flies are gnats or something living on the leaves, a photo of the insect and the leaf underside lets Dr. Flori in the Flori app suggest the likely culprit and a plan.
Frequently asked questions
Do fungus gnats bite or damage plants?
The adults do not bite and do not feed on plants. Their larvae live in the soil and can damage roots, mostly on seedlings and young plants or when numbers are very high.
How long does it take to get rid of fungus gnats?
Usually 3–4 weeks. One generation takes about 17 days to 4 weeks depending on temperature, so you need to keep the soil drier and keep trapping until a full cycle has passed with no new adults.
Do vinegar traps work for fungus gnats?
No. University of Wisconsin–Madison Extension says the vinegar traps used for fruit flies do not work for fungus gnats. Use yellow sticky traps for adults and potato slices to find larvae.
Should I repot a plant with fungus gnats?
Only if the old mix has broken down and stays wet. Fresh pasteurised mix helps, but gnats come back if the new mix is kept constantly moist, so change the watering routine as well.
Sources
General plant care information. Plants vary; when a plant is valuable or a problem spreads quickly, consult a local nursery or plant specialist.

