How to Get Rid of Fungus Gnats: What Actually Works

The Infirmary | How to Get Rid of Fungus Gnats

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.

The verdict Fungus gnats live and breed in wet potting mix, so dry it out: let the top 1 to 2 inches of soil dry between waterings, water from the bottom, and add a 1/2 to 1 inch layer of coarse sand or fine gravel on top. Catch the adults with yellow sticky traps, and kill the larvae with a Bti soil drench (sold as Mosquito Bits or Gnatrol) repeated every 5 to 7 days. Expect 3 to 4 weeks to break the life cycle (Wisconsin Extension). Sprays alone, vinegar traps and hydrogen peroxide are not the answer.

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).

FeatureFungus gnatsFruit flies
Where you see themOn and around potted plants, the soil surface, windowsAround the kitchen, fruit bowls, drains and trash
LookSlender, dark, long legs and antennae, mosquito-likeStockier, tan body, often red eyes
Breed inMoist potting mix and organic debris (UC IPM)Fermenting fruit and food waste
Vinegar trapsDo 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.

StageWhereHow long
EggMoist soil surface, in cracks in the mixAbout 3 days at 75°F (UC IPM); 3 to 6 days (Wisconsin)
LarvaTop 2 to 3 inches of the mix (Colorado State)About 10 days at 75°F (UC IPM); 1 to 2 weeks (Wisconsin)
PupaIn or on the soil surfaceAbout 4 to 5 days
AdultFlying and resting near the plantLives 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.

  1. 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.
  2. 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.
  3. 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).
  4. 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.
  5. 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.
How long it takes: Wisconsin Extension says to expect 3 to 4 weeks of modified watering and sand or gravel to bring an infestation under control. That matches the life cycle: you have to outlast the eggs and pupae that are already in the soil.

Every Method Compared

MethodTargetsVerdict
Letting the top 1 to 2 inches dryEggs and larvaeThe foundation; every source recommends it
Sand or gravel top layer (1/2 to 1 inch)Egg-layingRecommended (Wisconsin Extension)
Yellow sticky trapsAdultsGood for monitoring and reducing egg-laying; not enough alone
Bti drench (Mosquito Bits, Gnatrol)Larvae onlyEffective with repeat applications every 5 to 7 days
Beneficial nematodes (Steinernema feltiae)LarvaeEffective 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)LarvaeUsed in nurseries; UC IPM says probably not effective for individual houseplants
Pyrethrin spraysAdultsTemporary; does not reach larvae; Wisconsin says spray the soil surface and leaves, not the air
Repotting in fresh mixAll stagesUseful 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).

Insecticides: UC IPM says insecticides are rarely warranted in and around homes. If you do use one, choose a product labeled for indoor houseplants, and UC IPM suggests treating plants outdoors and waiting about a day before bringing them back in. Do not fog rooms or spray flying adults (UC IPM, 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:

  1. Cut raw potato into slices or wedges about 1/4 inch thick (Colorado State).
  2. Press them, cut side down, onto or slightly into the soil surface (UC IPM, Colorado State).
  3. After 3 to 4 days (Wisconsin), turn them over. Fungus gnat larvae, tiny clear worms with black heads, will be feeding on the underside.
  4. 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:

Remedies That Do Not Work (or Are Unproven)

RemedyWhat the evidence says
Apple cider vinegar trapsWisconsin Extension: vinegar traps for fruit flies do not work for fungus gnats
Hydrogen peroxide drenchWidely 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 airIneffective (Wisconsin); UC IPM says do not spray flying adults
Sprays aimed only at adultsColorado State: they do not affect larvae in the mix, so gnats return
Sticky traps aloneWisconsin: 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.

Key takeaway To get rid of fungus gnats, break their life cycle in the soil: let the top 1 to 2 inches dry between waterings, water from below, add a 1/2 to 1 inch layer of coarse sand or fine gravel, catch adults with yellow sticky traps and drench the mix with Bti every 5 to 7 days. Use potato slices to confirm the larvae are gone, and expect about 3 to 4 weeks. Vinegar traps, hydrogen peroxide and sprays aimed at flying adults will not fix it.

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.

Leave a Comment