How to Get Rid of Fungus Gnats in Houseplants

Fungus gnats are a houseplant pest driven entirely by one condition: consistently moist potting soil. The tiny adult gnats that swarm around houseplants are a nuisance, but they are not the damaging stage. The larvae, which hatch in the soil and feed on decaying organic matter and fine plant roots, are the source of actual plant harm. A fungus gnat treatment program that targets only adults with surface sprays will reduce the visible annoyance temporarily but do nothing to interrupt the larval population cycling through the potting mix. Eliminating fungus gnats requires addressing both the larvae in the soil and the cultural condition that makes the soil hospitable to them.

Identifying Fungus Gnats

Fungus gnat adults are small, dark-bodied flies in the family Sciaridae, roughly the size of a fruit fly but with longer legs and antennae and a more delicate, mosquito-like wing shape. They are weak fliers and tend to crawl along the soil surface or around the base of plants rather than flying actively across the room. The larvae are transparent to white, legless, and up to about a quarter inch long, with a distinctive black head capsule. They live in the top two inches of potting mix where moisture and organic matter are most concentrated.

Fungus gnats are most often confused with shore flies, which are similar in size and also found around houseplants. Shore flies have shorter antennae, a stubbier body, and distinctive white spots on their wings. Shore flies feed on algae growing on moist soil surfaces rather than on roots, and they do not damage plant roots, though their presence indicates the same overwatered conditions that favor fungus gnats.

The Root Cause: Overwatered Potting Soil

Fungus gnats establish in potting soil that is kept consistently moist through the full depth of the pot. Female adults lay eggs in the top half inch of potting mix, and the eggs and larvae require moisture to survive and develop. Potting soil that dries to at least the top inch or two between waterings is an inhospitable environment for egg laying and early larval development. The single most effective long-term control strategy is also the simplest: water less frequently and allow the surface layer of potting mix to dry between waterings.

This does not mean allowing plants to reach drought stress, which would cause more harm than the gnats. It means adjusting the watering schedule so that the top one to two inches of potting mix dry out between waterings rather than remaining continuously moist. For plants that genuinely need consistently moist soil, bottom watering (setting the pot in a tray of water and allowing the soil to wick moisture upward) keeps the surface layer drier than top watering and reduces the moist surface layer that fungus gnat females prefer for egg laying.

The Treatment Sequence

Treating an active fungus gnat infestation requires addressing multiple life stages simultaneously over several weeks, because adults in flight are laying eggs, larvae at various development stages are feeding in the soil, and pupae in the soil are developing into the next generation of adults. A single treatment that targets only one stage leaves the other stages to repopulate the pot.

Step 1: Let the Soil Dry

Allow the top two inches of potting mix to dry out completely before proceeding with any soil treatments. Wet soil reduces the effectiveness of biological controls and prevents the soil surface drying that disrupts the egg-laying cycle. If the plant’s health allows, extend the drying period to the full dry-down that the specific plant species can tolerate. This step alone will kill a significant proportion of eggs and first-instar larvae, which are the most moisture-dependent stages.

Step 2: Place Yellow Sticky Traps at Soil Level

Yellow sticky traps placed horizontally at the soil surface, or vertically just above it, capture adult gnats as they emerge from the soil. This reduces the adult population and the ongoing egg-laying pressure. Replace traps when they are full of insects. Sticky traps do not eliminate the larval population but provide a monitoring function that tells you when the adult emergence rate is declining.

Step 3: Apply a Biological Control to the Soil

The most effective and safest soil treatment for fungus gnat larvae is a drench with Bacillus thuringiensis subsp. israelensis, commonly sold as Bti, a strain of Bt that is specifically toxic to the larvae of fungus gnats, mosquitoes, and related flies. Bti is non-toxic to plant roots, beneficial soil organisms, children, and pets. Apply it as a soil drench to the full root zone according to the product label instructions, and repeat at weekly intervals for three to four weeks to address larvae that hatch from eggs laid before treatment began.

Beneficial nematodes in the species Steinernema feltiae are an alternative or complementary biological control. These microscopic roundworms actively hunt and parasitize fungus gnat larvae in the soil. Apply them as a soil drench, keep the soil slightly moist for a few days after application to support nematode survival, and avoid applying in direct sunlight or high heat, which can kill the nematodes before they reach the soil.

Step 4: Address the Adult Population Directly if Needed

For heavy adult infestations, a pyrethrin-based spray applied to the soil surface (not the plant foliage) can reduce the adult population quickly. Pyrethrin breaks down rapidly in sunlight and heat, typically within one to two days, which makes it a useful short-term knockdown tool without significant residual impact on beneficial soil organisms. This is a supplemental step, not a primary treatment: eliminating the larvae through soil management and biological controls is what resolves the infestation.

A neem oil soil drench, applied at the rates specified on the product label, can also suppress larval development through azadirachtin’s disruption of insect growth regulation. Neem oil soil drench is less effective than Bti for fungus gnats but is a reasonable choice when Bti is not available.

Preventing Re-Infestation

Fungus gnats re-enter the home most often on new plant purchases. Before bringing any new houseplant inside, inspect the soil surface carefully for adult gnat activity and check the potting mix moisture level. Allowing newly purchased plants to dry down to the appropriate level before their first watering reduces the chance of importing an active population.

Pasteurized potting mixes and mixes that include perlite, which improves drainage and reduces the moisture retention of the top layer, are less hospitable to fungus gnat egg laying than dense, peat-heavy mixes. Topping the surface of established pots with a half-inch layer of coarse horticultural sand or perlite is a physical deterrent that makes the surface layer less suitable for egg laying.

For houseplant pest management guidance including spider mites and other plant health issues, the full context for identifying and managing houseplant health problems is covered in our houseplant health problems guide.