The small dark flies drifting up from a houseplant every time it is touched are the visible part of a fungus gnat problem, and they are the part that does the least. Knowing how to get rid of fungus gnats starts with understanding that the adults are a symptom. The population lives in the top of the potting mix, and it lives there only because the mix stays damp.
To get rid of fungus gnats, let the top inch or two of the potting mix dry out between waterings, because the larvae that keep the population going need constantly moist mix. Trap the adults on yellow sticky cards while the mix dries, and expect flies for several more weeks while the generation already in the mix runs its course.
The vinegar dish and the peroxide drench that get recommended so often are not named by any of the extension sources below, and neither changes the condition the larvae need. The rest of this post is how to confirm you are dealing with fungus gnats, how to see whether the larvae are really gone, and where the measures extension services do name fit in.
Are they fungus gnats?
Two other small flies get blamed on houseplants. The University of Wisconsin-Madison Division of Extension notes that fungus gnats are often mistakenly identified as fruit flies, though they are two distinct insects. Fungus gnats are the ones that match this description from UC IPM: dark, delicate-looking flies similar in appearance to mosquitoes, with slender legs and segmented antennae longer than the head, mostly about a sixteenth to an eighth of an inch long. Colorado State University Extension adds the tell that settles it from across the room: fungus gnat adults are weak fliers, typically flying in short, erratic patterns. They rise from the pot when it is disturbed and settle back on the mix, the pot rim or the lowest leaves. A fly that hovers over the fruit bowl or the sink and flies strongly is something else, and the fungus gnats vs fruit flies post sets out the three-second check that tells the two apart.
Up close, Wisconsin and Colorado State both describe a distinct Y-shaped set of veins near the wing tips. A hand lens, or a close phone photo of a gnat stuck on a sticky card, may show it.
This is the step where a photo earns its keep. Fungus gnats, fruit flies and the tiny winged adults of whitefly all read as “little flies on my plant” to someone who has not met them before, and the fix for each is different. A clear shot of one adult on a leaf or a sticky card lets Plant Sickness Identifier tell them apart, and the fungus gnat guide sets out the lookalikes side by side. The mold on plant soil post covers the other common confusion, which is white fuzz on the mix being blamed on the gnats when both are just signs of a mix that never dries.
What fungus gnats actually need
Adult fungus gnats do not feed on plants. UC IPM states that adults do not damage plants or bite people, and Colorado State calls them a nuisance. The larvae are the population. UC IPM describes them as having a shiny black head and an elongated, whitish-to-clear, legless body, living in moist organic debris or potting soil, where they eat leaf mold, compost, fungi and root hairs. Colorado State says the larvae are usually in the top two to three inches of the growing medium and primarily feed on fungi, algae and decaying plant matter.
So the resource is a damp, organic surface layer. UC IPM’s cultural advice follows directly: avoid overwatering, provide good drainage, and allow the surface of container soil to dry between waterings. Colorado State says to let the growing medium dry between waterings, especially the top one to two inches, and Wisconsin says to keep the soil surface dry to eliminate favorable egg-laying sites by letting the top inch dry before watering.
Can the larvae hurt the plant? Rarely, indoors. UC IPM says larvae can damage roots and stunt growth, with serious damage mainly a problem of greenhouses, nurseries and sod farms. Wisconsin says that at high populations larvae may feed on root hairs or tunnel into roots, and that this sort of damage is rare in home settings. The honest reason to deal with fungus gnats is that they are annoying and that their presence means the plant is being kept too wet, which is the thing that does hurt it.
How long it takes, and why the flies keep coming
The reason a watering change can feel like it is not working is the life cycle. Colorado State gives the full cycle as three to four weeks at typical indoor temperatures, with each female laying up to 200 eggs. Wisconsin breaks it down: eggs hatch within three to six days, larvae feed for one to two weeks, pupae take four to five days, and the adults live about a week. UC IPM gives about 17 days from egg to adult at 75 degrees Fahrenheit.
That means the eggs and larvae already in the mix on the day the watering changes will keep producing adults for several weeks afterward. Adults appearing in week two or three are not a sign that the method failed. Adults still appearing in week six are.
The free method, in order
Let the top of the mix dry. Water only when the top inch or two is dry to the touch, and water thoroughly when you do, so the plant is not short of water lower down. Wisconsin suggests watering from the bottom as an alternative, which keeps the surface layer dry while the root ball drinks. Pour off any water that collects in the saucer. The winter houseplant post explains why this matters more from now on: plants drink less in low light, and the same summer routine leaves the mix wet for far longer.
Remove what the larvae eat. Clear fallen leaves and other debris from the surface. UC IPM advises minimizing moist, decomposing organic material in the mix, and a pot that has had leaves rotting on the surface all summer is exactly that.
Trap the adults. Yellow sticky cards are the monitoring tool every extension page names. Wisconsin suggests placing them near the plant’s leaves; UC IPM notes they can be cut into smaller squares and attached to wooden skewers pushed into the pot; the University of New Hampshire Extension suggests laying cards face up on the potting mix surface and checking them weekly to judge the population. The cards do not end an infestation on their own, because they catch adults after the larvae have been laid, but they show whether the numbers are falling.
Watch a potato slice. This is the check that shows the larvae themselves. UC IPM describes raw potato chunks placed in pots with the cut side down; Colorado State says the larvae migrate to the potato and start feeding within a few days; Wisconsin suggests checking the slices after three to four days. Lift the slice and look at the underside. Pale, translucent larvae with black heads clinging to the potato mean the mix is still supporting them. A clean slice two weeks running, with the sticky cards catching nothing new, is how you know they are gone.
Cover the surface, optionally. Wisconsin suggests a half-inch to one-inch layer of coarse sand or fine gravel over the mix, which keeps the egg-laying surface dry. It helps most on plants that genuinely need the lower mix kept moist.
Repot the worst pots. A plant in old, broken-down, constantly wet mix that keeps producing gnats despite everything above is better off in fresh mix in a pot with a drainage hole, with the old mix thrown out rather than reused. The soil section of the symptom checker covers the other signs that a mix has had its day.
When drying out is not enough
Some plants cannot be allowed to dry, such as seedlings, cuttings and moisture-loving ferns, and some infestations are large enough to want a second measure. Extension guidance names two biological options that target the larvae in the mix. UC IPM describes Bacillus thuringiensis subspecies israelensis (Bti), a naturally occurring bacterium that is toxic only to fly larvae and that commonly needs repeat applications. UC IPM and Colorado State both name the beneficial nematode Steinernema feltiae, which seeks out and kills fungus gnat larvae in the mix, and UC IPM notes it works within a range of about 60 to 90 degrees Fahrenheit. UC IPM also mentions a predatory mite, Hypoaspis, adapted to feeding in the upper layers of moist soil.
Both Bti and nematodes are applied to the mix, not the air or the leaves, because the larvae are in the mix. Rates, timing and which product to use belong to the product label and to your local extension service. On insecticides, UC IPM’s position is that they are rarely warranted against fungus gnats in the home, and Wisconsin specifically warns that spraying the air for the adults is ineffective.
How to know they are gone
Fungus gnats are gone when a full generation has passed with no new adults. Given the three-to-four-week cycle the extension sources describe, about four weeks of clean sticky cards and clean potato slices on a mix that is now drying between waterings is a reasonable working window, shorter in a warm room and longer in a cool one. A gnat or two in week two is the old generation emerging. A fresh batch in week five means somewhere in the house a pot is still being kept wet, and the most common culprit is a plant that is watered on a schedule rather than by touch.