The small black flies hovering around houseplants and seedling trays are almost always fungus gnats. Adults are harmless nuisances, but their tiny white larvae live in the top inch or two of moist potting mix, feeding on fungi, organic matter and sometimes the fine roots of seedlings and cuttings. To get rid of gnats in plants, let the top 1 to 2 inches of potting mix dry out between waterings, empty saucers, catch adults with yellow sticky traps, treat the soil with Bacillus thuringiensis subsp. israelensis (Bti, sold as mosquito dunks or bits) or beneficial nematodes to kill larvae, and repot heavily infested plants into fresh, well-draining mix. Because the life cycle takes about three to four weeks, keep it up for at least a month.
Fungus gnat identification
| Stage | What it looks like | Where |
|---|---|---|
| Adult | Tiny (1/16 to 1/8 inch), dark gray to black, long legs and antennae, clear or smoky wings with a Y-shaped vein; weak, erratic fliers | Walking on the soil surface, flying around plants and windows |
| Larva | Thin, translucent white maggot up to 1/4 inch with a shiny black head | Top 1 to 2 inches of moist potting mix |
| Egg | Microscopic, laid in moist soil | Soil surface |
| Pupa | Small, in soil | Top layer of potting mix |
What are fungus gnats?
Fungus gnats are small flies in the families Sciaridae and Mycetophilidae. The Wikipedia article on fungus gnats explains that their larvae feed mainly on fungi growing in damp soil and decaying plant material, which is why they thrive in overwatered potting mix rich in peat, bark and compost. The Colorado State University Extension guide to fungus gnats as houseplant and indoor pests notes that their presence usually signals soil that stays too wet, and that adults are short-lived but lay many eggs, so populations build quickly indoors.

Are fungus gnats harmful to plants?
For most established houseplants, fungus gnats are a nuisance rather than a serious threat. The adults do not bite people or damage plants. Larvae mostly feed on fungi and decaying organic matter, but when numbers are high they also chew root hairs and tender roots, and they can tunnel into the stems of seedlings and cuttings. That is why seedlings in trays, newly rooted cuttings, and young plants in greenhouses are at greater risk: affected plants wilt, stop growing, yellow and sometimes collapse. Larvae can also spread root rot fungi such as Pythium between plants. If an established plant is declining, check for overwatering and root rot as well as gnats.
How do you know you have fungus gnats?
- Small dark flies that rise from the soil when you water or touch a plant, and that hover around windows nearby.
- Adults running on the soil surface and leaves.
- Larvae in the soil: place a 1-inch slice of raw potato on the soil surface; after a few days, lift it and look for tiny, black-headed white larvae on the underside.
- Constantly moist potting mix, especially with a green film of algae or a moldy smell.
- Struggling seedlings with damaged stems and roots in trays.
What is the fungus gnat life cycle?
A female fungus gnat lays up to 200 tiny eggs in moist potting mix over her short adult life of about a week. Eggs hatch in four to six days, larvae feed for about two weeks, then pupate in the soil for three to four days before emerging as adults. At room temperature the whole cycle takes roughly three to four weeks, and generations overlap, so adults, eggs, larvae and pupae are all present at once. That is why treatments that target only adults never solve the problem: you need to break the cycle in the soil, and keep at it for at least one full life cycle, preferably two.
| Stage | Approximate duration at room temperature | Best way to target it |
|---|---|---|
| Egg | 4 to 6 days | Let soil surface dry; top-dress with sand |
| Larva | About 2 weeks | Bti drench, beneficial nematodes, predatory mites, drying the soil |
| Pupa | 3 to 4 days | Dry soil surface; repotting |
| Adult | About 1 week | Yellow sticky traps |
How do you get rid of gnats in houseplants?
- Change how you water. Let the top 1 to 2 inches of potting mix dry before watering again. This alone kills many eggs and larvae, which need constant moisture. Water thoroughly when you do water, then empty saucers and cachepots within 15 minutes.
- Bottom water. Setting pots in a tray of water for 15 to 20 minutes, then draining, keeps the soil surface drier, where gnats lay eggs.
- Trap adults. Place yellow sticky cards on stakes in the pots, near the soil, or lay them flat on the soil surface. They catch adults and show you whether numbers are falling.
- Treat the soil with Bti. Bacillus thuringiensis subsp. israelensis, sold as mosquito dunks or bits, kills fungus gnat larvae without harming plants, pets or people. Crush or soak a dunk in a gallon of water overnight, or follow the label, and use that water for your next few waterings.
- Apply beneficial nematodes (Steinernema feltiae) as a soil drench; they seek out and kill larvae.
- Top-dress the soil with a half-inch layer of coarse sand, fine gravel or aquarium grit, which dries quickly and discourages egg-laying.
- Repot severe cases into fresh, well-draining potting mix and a pot with drainage holes; discard the old mix outdoors.

Do home remedies for fungus gnats work?
| Remedy | Does it work? | Notes |
|---|---|---|
| Letting soil dry | Yes | The most important single step |
| Yellow sticky traps | For adults | Monitoring and reducing adults; do not affect larvae |
| Apple cider vinegar traps | For some adults | A dish of vinegar with a drop of soap catches some gnats, but fruit flies more |
| Potato slices | For monitoring | Attract larvae so you can see if they are present |
| Hydrogen peroxide drench (3% diluted 1:4 with water) | Partly | Kills larvae on contact; can damage roots if used too strong or too often |
| Cinnamon on soil | Little evidence | May slow fungal growth on the surface; not proven against larvae |
| Neem oil soil drench | Some effect | Can reduce larvae; use a product labeled for soil application |
| Bti (mosquito dunks) | Yes | Targets larvae specifically and safely |
Safety and label note: Bti, nematodes and hydrogen peroxide are safe when used as directed, but always follow the product label. Use only 3 percent household hydrogen peroxide, diluted, and never stronger concentrations. Keep sticky traps, dunks and all products out of reach of children and pets.
How do you prevent fungus gnats?
- Water by need, not by schedule. Check the soil with a finger or moisture meter before watering. See overwatering vs underwatering for signs your plants are getting too much water.
- Use a well-draining mix with perlite or bark, and pots with drainage holes.
- Avoid oversized pots, which hold excess wet soil around small root systems.
- Store potting mix sealed, since open bags can become infested; some gardeners bake or freeze bagged mix before use.
- Remove dead leaves and debris from the soil surface.
- Quarantine new plants for a couple of weeks and check for gnats before placing them with other plants.
- Improve light and air flow, which help soil dry evenly between waterings.
Fungus gnats in seed-starting trays
Seedlings are most at risk because their roots and stems are tiny and tender. Use fresh, sterile seed-starting mix, water from below, run a small fan nearby to dry the surface, and remove humidity domes as soon as seeds sprout. Add yellow sticky cards above the trays, and use Bti in the watering tray if larvae appear. Damping-off disease often appears alongside gnats in overly wet trays. Plan indoor sowing dates with the seed starting calculator so seedlings are not held indoors longer than needed.
Fungus gnats vs fruit flies vs drain flies
| Fly | Appearance | Where it breeds |
|---|---|---|
| Fungus gnat | Dark, slender, long legs, mosquito-like; weak flier | Moist potting soil |
| Fruit fly | Tan, stocky, often red eyes | Overripe fruit, kitchen scraps, drains |
| Drain fly | Fuzzy, moth-like, gray wings held roof-like | Sink and shower drains |
| Shore fly | Dark, stout, with light spots on wings | Algae on wet soil and benches in greenhouses |
If the flies are gathering in the kitchen rather than around plants, they are probably fruit flies; if they come from drains, they are drain flies. Getting the identification right means you treat the actual breeding site. The pest identifier can help.
Should you use insecticides for fungus gnats?
The Washington State University PestSense fact sheet on fungus gnats recommends reducing moisture and using biological controls such as Bti before considering any chemical options.
Rarely. Household insecticide sprays kill some adults but leave larvae in the soil untouched, and they add unnecessary chemicals to living spaces. Bti, beneficial nematodes and predatory soil mites (Stratiolaelaps scimitus, also called Hypoaspis) are targeted, low-risk options that work on the larvae. If you choose any product, use one labeled for fungus gnats on houseplants and follow the label exactly.
How long does it take to get rid of fungus gnats?
Expect three to six weeks. Adults keep emerging from pupae that were already in the soil when you started treatment, so you will still see gnats for the first week or two even if everything is working. Count the gnats on your sticky traps each week; steadily falling numbers mean success. Keep watering carefully afterward, because gnats will return if the soil stays constantly wet.
Dealing with more than one problem? Our plant pests and diseases guide lists every insect and disease we cover, organized by symptom.
Free printable: the Year-Round Garden & Preserving Planner
Planting dates for 24 crops, monthly tasks, blanching times, canning safety numbers and a winter storage chart in one 8-page PDF. Enter your email to download it instantly and get our seasonal garden newsletter.
No spam. Unsubscribe any time. We never sell your email.
Fungus gnat FAQ
Why do I have gnats in my houseplants?
Usually because the potting mix stays too moist, which lets fungus gnat larvae thrive.
Do fungus gnats bite?
No, they do not bite people or pets.
What kills fungus gnat larvae?
Bti (mosquito dunks), beneficial nematodes, predatory soil mites and letting the soil dry out.
Can fungus gnats live without plants?
Adults live only about a week; without moist soil to breed in, populations die out.
Does hydrogen peroxide kill fungus gnats?
A diluted 3 percent solution kills larvae on contact, but use it sparingly to avoid harming roots.
Do fungus gnats come from potting soil bags?
They can, especially from opened bags stored damp; keep bags sealed and dry.
Which houseplants get fungus gnats most?
Any plant in moist, organic potting mix can host fungus gnats, but some are especially prone because they like evenly moist soil or are often overwatered: peace lilies, ferns, calatheas, African violets, fiddle-leaf figs, pothos and herbs grown on windowsills. Plants in self-watering pots and decorative pots without drainage holes are also common sources. Succulents and cacti in gritty mix rarely have problems unless overwatered. If gnats keep returning, the plant that stays wettest in your collection is usually the breeding site.
Can fungus gnats spread to other plants?
Yes. Adults fly from pot to pot and lay eggs wherever they find moist soil, so one infested plant can seed gnats throughout a room. Treat every plant in the area at the same time, use sticky traps near all of them, and adjust watering for the whole collection rather than just the most obvious plant. Isolating a heavily infested plant in another room while you treat it also helps.
Do fungus gnats mean root rot?
Not necessarily, but the two often go together because both thrive in soggy soil. If a plant has gnats and is also wilting despite wet soil, has yellowing lower leaves or a sour smell from the pot, slide it out and check the roots. Healthy roots are firm and white or tan; rotted roots are brown, mushy and fall apart. Trim away rotted roots and repot into fresh mix in a pot with good drainage, then water more sparingly.
References: Colorado State University Extension, Fungus Gnats as Houseplant and Indoor Pests; Washington State University PestSense, Fungus Gnats; Wikipedia, Fungus gnat.
Fungus gnat life cycle and a four-week plan
The University of Wisconsin’s fungus gnats on houseplants page describes adults as dark brown or black flies about 1/8 inch long with a Y-shaped vein pattern near the wing tips, and larvae as pale worm-like maggots with black heads reaching 1/4 inch. Eggs hatch in 3 to 6 days, larvae pass four instars over 1 to 2 weeks, adults emerge 4 to 5 days after pupation and live about a week; egg to adult takes 3 to 4 weeks, and a female can lay up to 200 eggs on moist soil. They are commonly associated with overwatered plants, and changing watering is described as the most important control step.
- Dry out: let the top inch of soil dry before watering, or water from the bottom.
- Top-dress with 1/2 to 1 inch of coarse sand or fine gravel so soil is less attractive for egg-laying.
- Trap: yellow sticky traps near leaves catch adults; potato slices on the soil show larvae within 3 to 4 days. Vinegar traps do not work.
- Bti (Bacillus thuringiensis israelensis, sold as Gnatrol or Mosquito Bits) targets larvae only; water well after application and repeat every 5 to 7 days.
Expect 3 to 4 weeks of modified watering and top-dressing to bring an infestation under control. Our garden watering calculator can help set a schedule.
Safety and legal note: Mosquito products and Bti should be used only as labelled, and kept away from pets, children and fish tanks. Keep sticky traps away from pets and young children. Rules vary by country and region.
Reviewed October 2026. Sources: University of Wisconsin Extension, Fungus Gnats on Houseplants



