You water your seedling tray and a small cloud of black flies lifts off the soil, drifts past your face and settles back down like nothing happened. A week later they are orbiting every houseplant you own. What are these tiny flies, where are they coming from, and are they eating your seedlings?
Short answer: fungus gnats are tiny dark flies whose larvae live in the top inch or two of wet potting mix, where they eat fungi, organic matter and the fine roots of seedlings. To get rid of them, break the life cycle: let the top 1–2 inches of mix dry between waterings, trap adults with yellow sticky cards, and treat larvae with a Bti or beneficial-nematode drench. Do all three for at least three weeks, because one generation takes only about 17 days at 75 °F.
Table of Contents
Table of Contents
This guide covers how to confirm you have fungus gnats (and not fruit flies or shore flies), why seed-starting trays and indoor herb pots breed them so well, the numbers that matter, and a step-by-step, three-week plan drawn from university extension research.

What Are Fungus Gnats, and Do They Harm Seedlings?
Fungus gnats are small flies in the family Sciaridae, mostly in the genus Bradysia. University of Florida IFAS lists 65 Bradysia species in North America. The adults are about 1/16 to 1/8 inch (1.5–3 mm) long, dark and delicate, with long segmented antennae and legs. Many common species have a Y-shaped vein near the wing tip (UC IPM).
The adults are a nuisance, not a threat. They don’t bite people and don’t feed on plants. The larvae do the damage. They are legless and whitish to clear, with a shiny black head, and they grow to about 1/4 inch (6 mm) long (University of Florida IFAS).
How fungus gnat larvae damage plants
Fungus gnat larvae mainly eat fungi and decaying organic matter. In large numbers they also chew root hairs and fine roots and can tunnel into stems. UC IPM notes that this damage stunts growth and is worst in seedlings and young plants. In wet, organic mixes with very high populations, houseplants and interior plantings have died.
The risk goes beyond chewing. In laboratory studies reviewed by UConn Extension, adult gnats carried spores of Botrytis, Verticillium, Fusarium and Thielaviopsis between plants, and spores turned up in their droppings. A peer-reviewed review by Cloyd (2015) also links the larvae to the spread of soil-borne pathogens in greenhouses. That matters for seed starters, because the same wet, cool conditions favour damping-off in seedlings.
Keep one caution in mind: wilting seedlings are more often caused by overwatering, poor drainage or root rot than by larvae (UC IPM). Treat gnats as a symptom of a soil-moisture problem, not just as a pest.
How to tell fungus gnats from fruit flies and shore flies
Three small flies commonly turn up around indoor plants, and the fix differs for each. Use this quick comparison before you treat anything.
| Feature | Fungus gnat | Fruit fly | Shore fly |
|---|---|---|---|
| Body shape | Slender, mosquito-like, long legs | Compact, tan to brown | Stocky, dark, house-fly shape |
| Antennae | Long and segmented | Short | Short, bristle-like |
| Eyes | Dark | Usually red | Dark |
| Flight | Weak; runs over soil, flutters near pots | Hovers around fruit and drains | Strong, quick flights |
| Where larvae live | Top 1–3 in of moist potting mix | Fermenting fruit, drains, bins | Algae on wet media, trays and floors |
| Harms roots? | Yes, at high numbers | No | Not directly; feeds on algae |
| Best first move | Dry the mix surface; Bti or nematodes | Remove ripe fruit; clean drains | Remove algae; reduce standing water |
If you see flies on the kitchen counter but none rise from the pots when you tap them, you probably have fruit flies. If your trays are green with algae, you may have shore flies as well as gnats. Cloyd (2015) lists removing algae as a core cultural control for both pests. If you grow in water, see our guide to algae in hydroponics.

Fungus Gnat Life Cycle: Why They Keep Coming Back
Fungus gnats go through four stages: egg, larva (four instars), pupa and adult. Speed is what makes them persistent. At 75 °F (24 °C), UC IPM gives these timings: eggs hatch in about 3 days, larvae feed for about 10 days, and adults emerge about 4 days after pupating. That makes one generation (female to female) about 17 days. Warmer rooms mean more generations per year.

Other extension sources give slightly longer timings, mainly because of temperature and species. UConn Extension reports that eggs hatch in 4–6 days, larvae feed for about two weeks at 72 °F, and pupae take 4–5 days, for 21–28 days in total. Colorado State University Extension gives about 3–4 weeks at 65–75 °F. Each female lives 7–10 days and can lay up to 200 eggs in cracks in the growing medium (Colorado State University Extension). In one laboratory study cited by University of Florida IFAS, the average was 75 eggs per female at 75 °F.
The practical lesson is this: when you kill only the adults, the eggs, larvae and pupae already in the mix replace them within days. You have to cover at least one full generation, which means about three weeks of consistent control.
Numbers to Hold: Fungus Gnat Control at a Glance
These are the figures to keep in mind when you plan treatment. Each one comes from the extension sources linked in the table.
| What | Number | Why it matters | Source |
|---|---|---|---|
| Generation time at 75 °F (24 °C) | ~17 days | Treat for at least 3 weeks | UC IPM |
| Egg to adult at 65–75 °F (18–24 °C) | 3–4 weeks | Cooler rooms slow the cycle but don’t stop it | Colorado State University Extension |
| Eggs per female | Up to 200 | A few adults can restart an infestation | Colorado State University Extension |
| Adult lifespan | 7–10 days | Sticky cards catch females before they lay | Colorado State University Extension |
| Larva depth | Mostly the top 1 in; up to 2–3 in | Drying the surface layer starves them | University of Florida IFAS; Colorado State University Extension |
| Dry-down depth between waterings | Top 1–2 in (2.5–5 cm) | The main cultural fix | Colorado State University Extension |
| Bti residual indoors | ~2–5 days | Repeat about every 5 days | UC IPM; UConn Extension |
| S. feltiae nematode working range | 60–90 °F (16–32 °C), moist mix | Typical indoor temperatures are ideal | UC IPM |
| Nematode kill time | 1–4 days | Fast knock-down of larvae | UConn Extension; Colorado State University Extension |
| Potato monitor check | After 48 h to a few days | Count larvae before and after treatment | UConn Extension; Colorado State University Extension |
Why Seed-Starting Trays and Indoor Pots Breed Fungus Gnats
Fungus gnats need moist to very moist growing media (University of Florida IFAS). Egg-laying females are most attracted to moist mixes high in peat moss (Colorado State University Extension). A seed-starting setup ticks every box: a peat- or coir-based mix, humidity domes, bottom-watering trays that stay wet, and warm heat mats. Here are the usual triggers.
- Constantly wet surface. Domes left on after germination and saucers that never dry keep the top inch wet, which is exactly where larvae live.
- Algae and organic debris. Green films on cells, rockwool cubes and trays feed larvae and shore flies. Removing algae and plant debris is one of the cultural controls stressed by Cloyd (2015).
- Fresh or poorly stored mix. Bags kept open, outdoors or damp support more gnat activity. UConn Extension also advises avoiding composts less than a year old.
- Overwatered houseplants nearby. One soggy pot can supply adults to an entire seed shelf.
- Warm rooms. Indoor plants support gnat breeding all year, and heat shortens each generation (Colorado State University Extension).

Hydroponic growers aren’t immune. Wet rockwool, coco plugs, constantly damp clay pebbles and algae on exposed media all give larvae a home. Keeping light off the nutrient solution and the media surface helps with algae and gnats at the same time. If plants in your system are also wilting with brown roots, check our hydroponic root rot guide.
How to Get Rid of Fungus Gnats: A 3-Week Plan
Combine several methods. Each one attacks a different life stage, and together they cover a full generation.
Step 1: Confirm and count (day 0)
Put a yellow sticky card at soil level in each tray or pot. UConn Extension recommends laying cards horizontally at the media surface and replacing them weekly. At home, UC IPM suggests cutting cards into small squares and mounting them on skewers. To find larvae, push a 1/4-inch slice of raw potato into the mix (Colorado State University Extension), or press a peeled chunk cut side down onto the surface. Check the underside after about 48 hours. Larvae on the potato confirm an active breeding site, and the count gives you a baseline.
Step 2: Dry out the top layer (days 1–21)
This step does the most work. Let the top 1–2 inches of mix dry between waterings (Colorado State University Extension). For seedlings, remove the humidity dome as soon as most seeds have germinated, pour off water left in bottom trays once the mix has wicked up what it needs, and water less often but thoroughly. UC IPM also recommends improving drainage, for example by adding perlite or sand to the mix.
Step 3: Drench larvae with Bti or beneficial nematodes (days 1–21)
Bti (Bacillus thuringiensis subsp. israelensis) is a naturally occurring bacterium that is toxic only to fly larvae. It doesn’t persist indoors, so UC IPM advises reapplying about every five days. Home products include mosquito granules that you soak in the watering can, and Gnatrol. UConn Extension notes that Bti works best on young larvae and stays active for only about two days, so repeat applications are normal. Always follow the product label for rates.
Beneficial nematodes (Steinernema feltiae) are the most effective nematode species against fungus gnats. They work best at 60–90 °F in moist mix (UC IPM) and kill larvae within one to four days (UConn Extension; Colorado State University Extension). After several applications they can reproduce in the pots and give season-long control. They’re live and perishable, so use them soon after delivery.
Step 4: Trap the adults (days 1–21)
Keep sticky cards in place. Yellow cards placed under the canopy or at container edges can mass-trap egg-laying females (Colorado State University Extension). Each female you catch is up to 200 eggs that never get laid.
Step 5: Clean up and reset (between crops)
Remove dead leaves, algae and spilled mix. Store bagged media sealed and dry (University of Florida IFAS). Repot heavily infested houseplants into fresh mix (Colorado State University Extension), and wash and sanitise trays and domes before the next sowing. If your crop is microgreens, the same dry-surface habits also help prevent microgreens mold.
Step 6: Re-check on day 21
Put out fresh potato pieces and fresh sticky cards. If larvae counts are near zero and new cards stay almost clean for a week, you’ve broken the cycle. If not, keep the moisture routine and repeat the larval drench for another generation.
Fungus Gnat Treatments Compared: What Works and What Doesn’t
Not every popular remedy has research behind it. Here is how the common options compare for a home grower.
| Method | Stage targeted | Evidence | Notes |
|---|---|---|---|
| Drying top 1–2 in of mix | Eggs and larvae | Recommended by every extension source cited here | Free; fixes the cause |
| Yellow sticky cards | Adults | Monitoring and mass-trapping (Colorado State University Extension) | Doesn’t reach larvae; use with a drench |
| Bti drench | Larvae | Effective but short-lived (UC IPM) | Repeat about every 5 days; safe for plants |
| Steinernema feltiae nematodes | Larvae | Most effective nematode species (UC IPM) | Needs moist mix; perishable |
| Predatory mites (Stratiolaelaps) | Larvae and pupae | Used in greenhouses (UConn Extension) | Not a good fit for single houseplants (UC IPM) |
| Sand or grit top-dressing | Egg-laying adults | Mixed: UConn Extension found coarse sand or diatomaceous earth does not prevent egg laying | Can help the surface dry faster |
| Hydrogen peroxide drench | Larvae (contact) | Not among the methods these extension guides recommend | No residual; doesn’t fix wet mix |
| Pyrethrin or pyrethroid sprays | Adults | Temporary control (UC IPM) | Rarely warranted indoors; treat outdoors |
Chemical insecticides are rarely needed in homes. If you do use one, UC IPM advises moving plants outdoors to treat them and waiting about a day before bringing them back. Never use systemic insecticides on edible herbs or microgreens unless the label specifically allows that crop.
From the Lab Bench
Interpreted through basic insect ecology, the extension data point to one conclusion: fungus gnats show up where the root zone stays wet, not as random bad luck. A 17-day generation and up to 200 eggs per female mean that any control aimed only at adults will lose, because the population in the mix rebuilds faster than you can swat it. Drying the surface removes the larvae’s habitat, and that is why it outperforms every product.
There is also a plant-physiology angle. Seedling mixes that stay saturated have less air in the pores, and oxygen-starved roots are weaker and more open to Pythium and other water moulds. Larval feeding wounds add more entry points, and adults can move fungal spores between trays (UConn Extension). So if you find gnats in a seed tray, look for overwatering, weak roots and a higher disease risk at the same time. Fix the watering and you lower all three.
Finally, the evidence on physical barriers is less clear than social media suggests. Cloyd (2015) discusses media-surface barriers as a cultural option, while UConn Extension found coarse sand and diatomaceous earth did not stop egg laying. A sensible reading is that a dry, coarse top layer helps mainly because it dries out, not because gnats can’t get through it.
Prevention checklist for this winter
- Remove domes once most seeds have germinated, and run a small fan for airflow.
- Bottom-water, then drain the trays so cells never sit in water.
- Keep seedling mix bags sealed and dry; don’t use mix that smells sour.
- Keep a sticky card in every tray as an early-warning system.
- Keep new houseplants away from seedlings until a potato slice in the pot shows no larvae.
- Grow under adequate light so seedlings use water faster; see our grow light distance chart.
More seed-starting troubleshooting lives in our Leggy & Weak Seedlings section. If you’re growing kitchen herbs this season, pair this guide with growing herbs indoors in winter.
FAQ
How do I get rid of fungus gnats in seedlings fast?
Combine three steps for at least three weeks: let the top 1–2 inches of mix dry between waterings, put yellow sticky cards at soil level, and drench the mix with Bti (repeated about every five days) or Steinernema feltiae nematodes. Remove humidity domes after germination.
Are fungus gnats harmful to plants?
The adults are harmless, but the larvae can be. In large numbers they feed on root hairs and fine roots, which stunts seedlings and young plants. In lab studies, adults have also carried spores of fungi such as Fusarium and Botrytis between plants.
What causes fungus gnats in houseplants?
Consistently moist potting mix, especially peat-based mix rich in organic matter. Overwatering, saucers that stay full of water, algae and poorly stored bags of mix all create breeding sites.
How long does it take to get rid of fungus gnats?
Plan on at least three weeks. One generation takes about 17 days at 75 °F and 3–4 weeks in cooler rooms, so control has to cover the eggs and pupae already in the mix as well as the adults.
Does hydrogen peroxide kill fungus gnat larvae?
It’s a popular home remedy, but it isn’t among the methods recommended by the university extension guides cited here. It has no lasting effect and doesn’t fix wet mix. Bti and beneficial nematodes are better-supported larval treatments.
Can fungus gnats live in hydroponic systems?
Yes. Wet rockwool, coco plugs, damp clay pebbles and algae on exposed media can all host larvae. Keep light off the media and solution, remove algae, and treat the media surface with Bti if larvae appear.
Will fungus gnats go away on their own?
Rarely, while the mix stays wet. Females live 7–10 days and can lay up to 200 eggs each, so populations rebuild quickly. Once the surface of the mix stays dry, they usually die out within a generation or two.
Sources
- Bethke, J.A. and Dreistadt, S.H. (2013). Pest Notes: Fungus Gnats. UC ANR Publication 7448. University of California Statewide IPM Program.
- Cranshaw, W. and Cloyd, R.A. Fungus Gnats as Houseplant and Indoor Pests. Colorado State University Extension Fact Sheet 5.584 (reviewed 2025).
- Mead, F.W. and Fasulo, T.R. Darkwinged Fungus Gnats, Bradysia spp. (Insecta: Diptera: Sciaridae). EENY-215/IN372, University of Florida IFAS Extension (rev. 2025).
- Pundt, L. Managing Fungus Gnats in the Greenhouse. UConn Extension IPM (rev. June 2024).
- Cloyd, R.A. (2015). Ecology of Fungus Gnats (Bradysia spp.) in Greenhouse Production Systems Associated with Disease-Interactions and Alternative Management Strategies. Insects 6(2): 325–332. (via PubMed, PMID 26463188)
