A close view over a mixed vegetable canopy with a few leaves carrying early blemishes.
  1. Home
  2. Crop Science
  3. Pest & Disease Library
  4. Fungus Gnats

Fungus gnats: how to get rid of them in houseplants and soil

Last updated:

Fungus gnats (Bradysia spp.) are small, dark, mosquito-like flies whose larvae live in moist potting soil and can feed on roots.1 To get rid of them, let the top 1 to 2 inches of soil dry between waterings, remove standing water, trap adults on yellow sticky cards, and treat larvae with Bacillus thuringiensis subsp. israelensis (Bti) or Steinernema feltiae nematodes, following the product label.1,2

A few small dark fungus gnats resting on moist potting mix beside healthy seedlings.

How do you identify fungus gnats?

Fungus gnats (Bradysia spp.) are dark, delicate flies that look like small mosquitoes. Most adults are 1/16 to 1/8 inch long, with light gray to clear wings, slender legs and segmented antennae longer than the head, and the common Bradysia species carry a Y-shaped vein in the wing.1 The two species growers meet most often in greenhouses are Bradysia coprophila and Bradysia impatiens.3

The larvae do the damage and are rarely noticed. They are legless and whitish to translucent, with a shiny black head, and they live in the upper layer of moist growing media.1,2 Adults do not fly well and tend to stay close to the growing medium.3 Fungus gnats are often mistaken for fruit flies, but they are drawn to moist soil rather than ripening fruit.6 Shore flies, the other small fly common around wet pots, have short, bristle-like antennae and are associated with algae.1

  • Adults: dark, about 1/8 inch, long legs and antennae, Y-shaped wing vein.1,2
  • Larvae: legless, translucent, shiny black head, in the top of the potting mix.1,2
  • Larva check: push a slice of raw potato into the mix; larvae move to it and start feeding within a few days, so turn it over to look underneath.2
  • Lookalike: shore flies have short, bristle-like antennae and breed where algae grows.1

In North America fungus gnats breed indoors year round, while outdoors in California's interior valleys they peak in winter and spring1; indoor outbreaks are tied to watering that is not reduced in fall and winter, when plants use less water2. In the Southern Hemisphere the same cool-season watering risk falls from about June to August.

Why are there fungus gnats in my houseplants and soil?

Females lay eggs in moist organic debris or potting soil, so persistently wet mix is the main driver.1 Fungus gnats are found in almost every greenhouse but become a problem under excessive moisture, which is why propagation, with constantly wet cuttings and plugs, is the high-risk stage.3 Incompletely composted organic matter, moist decomposing grass clippings, compost, organic fertilizers and mulches are favored breeding sites, and standing water and algae support large populations.1,3

Indoors, watering needs to be reduced in fall and winter, when plants use less water.2 Gnats can arrive in contaminated potting soil, on new plants or through open doors and windows.6

Development is fast. At 75°F, eggs hatch in about 3 days, larvae feed for about 10 days before pupating, and adults emerge about 4 days later, for a generation of roughly 17 days; warmer temperatures mean faster development.1 Adults live 7 to 10 days, a female may lay up to 200 eggs, and indoors reproduction continues year round.2

Fungus gnat life cycle at about 75°F (24°C). Sources:1,2,3
StageWhere it livesApproximate duration
EggMoist organic debris or potting soilAbout 3 days
Larva (four instars)Upper layer of the growing mediumAbout 10 days
PupaIn the growing mediumAbout 4 days
AdultOn and near the soil surface7 to 10 days

Do fungus gnats damage plants?

Adults are a nuisance; they do not bite people or damage plants.1 The larvae feed mainly on fungi, algae and decaying plant matter, but they also feed on healthy roots and tunnel into the stems of young cuttings and seedlings, which interferes with water and nutrient uptake and causes wilting and stunted growth.2,3 Serious damage is most common in greenhouses, nurseries and sod farms, and high populations in moist, organic-rich mixes have caused root damage and plant death in houseplants and interior plantings.1

Fungus gnats also interact with plant disease. Larval feeding creates wounds that let soilborne fungi in, larvae have been shown to transmit Pythium, Fusarium and Verticillium species from diseased to healthy plants, and adults can carry spores of Botrytis cinerea and other fungi on their bodies.3 Laboratory transmission may overstate what happens in a greenhouse, but the potential for both life stages to move pathogens is why tolerance for fungus gnats in propagation is very low.3

Wilting alone does not prove fungus gnats. Too much or too little water, root decay fungi and poor drainage cause wilting more often, so check the roots and look for larvae before treating.1

How do you get rid of fungus gnats in houseplants?

Start with moisture and sanitation. Insecticides and biological controls work best when the conditions that breed fungus gnats are removed at the same time.3

  • Let the soil surface dry between waterings; Colorado State University Extension advises letting the top 1 to 2 inches dry.1,2
  • Use pots with drainage holes, empty water from saucers, and improve drainage by adding perlite or sand to the mix.1,6
  • Use pasteurized potting mix and avoid incompletely composted organic matter.1
  • Do not move infested plants among healthy ones, and consider discarding severely infested plants.1
  • Set yellow sticky cards in pots or under the canopy to catch adults and follow their numbers.1,2
  • Replace potato monitoring slices every few days to track larvae.1

Do mosquito dunks and beneficial nematodes work on fungus gnats?

Both target the larvae, which is where control has to happen. Bacillus thuringiensis subsp. israelensis (Bti) is a naturally occurring soil bacterium whose toxins affect only the larvae of mosquitoes, black flies and fungus gnats.5 Bti is the active ingredient in mosquito dunks, which can be mixed with water and applied to the soil.6 It gives temporary control and does not persist indoors, so repeat applications at about five-day intervals may be needed.1 Bti does not kill adults, so flying gnats decline over several weeks rather than overnight.7 Check that the label covers the use you intend and follow the product label for any Bti product.5

Steinernema feltiae is the beneficial nematode species most effective against fungus gnats.1 Applied as a drench, it kills larvae within 3 to 4 days.2 It works between 60 and 90°F in moist media and can give season-long control after several applications.1 Nematodes are live and perishable and are usually bought by mail order, so apply them promptly and follow the product directions.1

In greenhouses, the soil-dwelling predatory mite Stratiolaelaps scimitus and the rove beetle Dalotia coriaria also suppress fungus gnats.3 The mites feed on larvae and pupae but are unlikely to perform well in a single houseplant.1 UC IPM rates insecticides as rarely warranted around homes; if pyrethrins or pyrethroids are used, they give temporary control, should be applied to the soil surface and resting sites rather than fogged indoors, and houseplants should be treated outdoors.1 Relying on insecticides alone also risks resistance.3

Fungus gnat control options compared. Sources:1,2,3,4,6
MethodStage it targetsWhat the evidence says
Letting soil dry between wateringsEggs and larvaeFirst step in UC IPM and Colorado State guidance
Yellow sticky cardsAdultsMonitors and traps adults; does not reach larvae
Raw potato slicesLarvaeMonitoring only; larvae gather within a few days
Bti drench, including mosquito dunksLarvaeTemporary control; repeat applications needed indoors
Steinernema feltiae nematodesLarvaeLarvae die within 3 to 4 days; needs moist media at 60 to 90°F
Predatory mitesLarvae and pupaeUsed in greenhouses; weak in single houseplants
Hydrogen peroxideAdults and larvaeOne hydroponic trial; also reduced lettuce germination
Sand or diatomaceous earth top layerEgg-laying and emerging adultsNo effect on emergence or egg-laying in studies

Do hydrogen peroxide and sand top-dressings work on fungus gnats?

Hydrogen peroxide is a popular home remedy with thin evidence. A Cornell Cooperative Extension county guide describes pouring diluted 3% household hydrogen peroxide over the soil, where it fizzes as it reaches larvae, and then letting the soil dry.7 A peer-reviewed trial in a commercial hydroponic lettuce system sprayed hydrogen peroxide on phenolic foam plates: it reduced adult flies and left fewer larvae than water, but it also affected lettuce seed germination, and spinosyn was the only treatment that left no larvae.4 That trial was run in foam, not potting soil, and its germination effect makes peroxide a poor fit for seed trays; if you use it, follow the product label.4

Top-dressing pots with sand or diatomaceous earth is another common tip. Diatomaceous earth damages the insect cuticle, but in studies neither material changed adult emergence or egg-laying, because the layer leaves openings that larvae can pupate through and females can lay eggs in.3 A layer of coarse recycled-glass aggregate did reduce adult emergence over time, depending on its thickness, and works only as one part of a wider program.3

Key takeaways

  • Fungus gnats (Bradysia spp.) breed in moist, organic potting mix, and the larvae, not the adults, feed on roots.
  • Drying the top 1 to 2 inches of soil between waterings and removing standing water is the foundation of control.
  • Bti, the active in mosquito dunks, and Steinernema feltiae nematodes both target larvae; follow the product label.
  • Larvae can transmit Pythium, Fusarium and Verticillium, so propagation areas need the lowest tolerance.
  • Hydrogen peroxide has limited evidence, and sand or diatomaceous earth top layers did not stop emergence in studies.

References

  1. Pest Notes: Fungus Gnats (UC ANR Publication 7448)University of California Statewide Integrated Pest Management Program, UC Agriculture and Natural Resources · 2013 · University extension publication
  2. Fungus Gnats as Houseplant and Indoor Pests (Fact Sheet 5.584)Colorado State University Extension · 2003, reviewed 2025 · University extension publication
  3. Ecology of Fungus Gnats (Bradysia spp.) in Greenhouse Production Systems Associated with Disease-Interactions and Alternative Management StrategiesInsects (MDPI), 6(2):325 to 332 · 2015 · Review article · DOI 10.3390/insects6020325
  4. Hydrogen Peroxide for Insect and Algae Control in a Lettuce Hydroponic EnvironmentJournal of Agricultural Science (Canadian Center of Science and Education), 10(8):221 · 2018 · Peer-reviewed study · DOI 10.5539/jas.v10n8p221
  5. Bti for Mosquito ControlU.S. Environmental Protection Agency · 2026 · Government guidance
  6. Fungus Gnats: Tiny Pests in Houseplants and How to Control ThemN.C. Cooperative Extension, Beaufort County Center (NC State Extension) · 2025 · University extension publication
  7. A Spooky Houseplant Pest: Fungus GnatsCornell Cooperative Extension Allegany County · 2024 · University extension publication

Frequently asked questions

Do fungus gnats bite?

No. Adult fungus gnats do not bite people and do not damage plants; they are a nuisance when numerous.1,2 They may drink water from leaves or the soil surface, but the larvae in the soil are the stage that feeds on roots.2

How long does it take to get rid of fungus gnats?

A full generation takes about 17 days at 75°F, so adults keep appearing for a while after the larvae are treated.1 Adults live 7 to 10 days.2 A Cornell Cooperative Extension guide says to expect numbers to fall over 4 to 5 weeks with Bti and to reapply when new adults appear.7

Do yellow sticky traps get rid of fungus gnats?

They help but do not finish the job. Adults are attracted to yellow, and cards placed under the canopy or on pot rims can mass-trap females.2 Traps catch only adults, so pair them with drier soil and a larval treatment such as Bti or nematodes.1

Can fungus gnats spread to other plants?

Yes. UC IPM advises against moving infested plants into new areas.1 Adults can emerge from discarded growing medium and can carry fungal spores short distances in a greenhouse, so remove old mix promptly or keep it in sealed containers.3

Do dryer sheets repel fungus gnats?

In a laboratory study, fabric softener dryer sheets repelled adult fungus gnats; the sheets contain volatile compounds including linalool.3 Repellents do not kill the gnats and may push them to other plants, so they are not a stand-alone control.3