How to Get Rid of Soil Flies (Fungus Gnats)

Fungus gnats, often called soil flies, are a common nuisance for houseplant owners. These small, dark insects swarm around potted plants, signaling an active infestation in the moist soil below. While adult gnats are primarily a cosmetic issue, their offspring actively feed on the plant’s root system, causing significant damage, especially to seedlings and young plants. Eliminating these pests requires a two-pronged approach: reducing the visible adult population and aggressively targeting the larvae to break the reproductive cycle.

Identifying the Pest and Understanding the Life Cycle

The insect commonly called a soil fly is technically a fungus gnat, belonging to the family Sciaridae. Adult fungus gnats are slender, dark-bodied flies, approximately one-eighth of an inch long, with long legs and antennae. They are weak fliers, usually seen walking or hovering erratically near the soil surface, unlike shore flies which are chunkier, stronger fliers with five distinct light spots on their wings. The adult female lays up to 200 tiny, whitish eggs in the moist soil, which hatch into the destructive larval stage.

The larvae are translucent or whitish maggots with a distinct, shiny black head capsule and can grow up to a quarter-inch long. These larvae live in the top one to two inches of the growing medium, feeding on fungi, decaying organic matter, and fine plant roots and root hairs. This larval feeding causes the actual damage to the plant. After about two weeks, they enter a pupal stage in the soil before emerging as new adults, restarting the cycle. The entire life cycle can take as little as 17 days, allowing populations to multiply rapidly when conditions are favorable.

Immediate Solutions for Controlling Adult Flies

The most immediate way to reduce the visible population is by trapping the flying adults before they can lay more eggs. Yellow sticky traps are highly effective because fungus gnats are visually attracted to the color yellow. These adhesive cards should be placed just above the soil line of infested pots to capture the weak-flying adults. Monitoring the number of gnats caught also serves as a good indicator of the infestation’s severity and the success of subsequent treatments.

A simple liquid trap can also assist in adult control. A shallow dish filled with apple cider vinegar, wine, or beer will attract some of the flies. Adding one or two drops of liquid dish soap is necessary to break the surface tension. When the gnats land on the liquid, the disrupted surface tension causes them to sink and drown. These traps primarily catch adults and do not solve the underlying problem of larvae in the soil.

Eradicating Larvae and Breaking the Reproduction Cycle

The long-term solution requires treating the soil to eliminate the larvae, which are the source of the infestation. One successful method is applying products containing Bacillus thuringiensis israelensis (BTI), a naturally occurring soil bacterium. This bacterium is highly specific to the larvae of certain fly species, including fungus gnats, and is safe for plants, pets, and humans.

When fungus gnat larvae ingest the BTI spores and crystalline toxins, the alkaline conditions in their gut activate the toxin proteins. These activated toxins bind to receptors in the larval midgut, creating pores that disrupt the cell membranes. This causes the larvae to stop feeding and die within a few days.

BTI is typically applied by soaking granules, often sold as “Mosquito Bits,” in water for about 30 minutes, then using this infused water to drench the soil. This treatment should be repeated weekly for at least three consecutive weeks to ensure all newly hatched larvae are exposed before maturing into egg-laying adults.

Another effective method for acute larval elimination is a soil drench using diluted hydrogen peroxide. Common household 3% hydrogen peroxide should be diluted with water in a 1:4 ratio (one part peroxide to four parts water). This solution is poured over the soil until it drains out of the pot’s bottom holes, similar to a regular watering. The hydrogen peroxide reacts with organic matter and the larvae’s soft bodies, causing a fizzing action that kills the pests on contact. This treatment rapidly breaks down into water and oxygen, which is not harmful to the plant roots.

Cultural Practices for Long-Term Prevention

Once the infestation is cleared, altering care routines is necessary to prevent future gnats. Fungus gnats thrive in constantly saturated soil, so the most effective cultural practice is adjusting watering frequency to allow the top two inches of soil to dry out completely between waterings. Allowing the surface layer to dry removes the moist environment where adult females lay their eggs and where the larvae feed. Instead of watering from the top, consider using a bottom-watering technique where the pot sits in a saucer of water until the soil wicks up moisture, leaving the surface layer dry.

Applying a top dressing can create a physical barrier against egg-laying adults. A half-inch layer of coarse horticultural sand, fine gravel, or food-grade diatomaceous earth (DE) spread across the soil surface deters females from accessing the moist soil below. Diatomaceous earth is composed of sharp, microscopic fossilized remains that physically abrade the soft bodies of emerging or landing gnats, causing desiccation. However, DE must remain dry to be effective, so it is best used in conjunction with careful watering practices.