How to Get Rid of Mushroom Flies for Good

The presence of tiny flies hovering near potted plants or damp areas often signals an infestation of “mushroom flies,” primarily Fungus Gnats (Bradysia species) or Phorid Flies. These pests are drawn to the moist, nutrient-rich environment of decaying organic matter and damp soil. While adult flies are mostly a nuisance, their larvae live in the growing media and damage plants by feeding on roots, leading to stunted growth. Eradicating them requires a comprehensive approach that targets both the flying adults and the soil-dwelling larvae to break the reproductive cycle.

Identifying the Pest and Its Source

Correctly identifying the species is the first step toward effective control, as Fungus Gnats and Phorid Flies thrive in different conditions. Fungus Gnats are slender, black, mosquito-like insects measuring two to four millimeters long. They are weak, erratic fliers that hover low over the soil surface. Phorid Flies are often brown and have a distinctive “humped-back” appearance. They prefer to run erratically across surfaces rather than flying when disturbed. While Fungus Gnats breed almost exclusively in moist potting soil, Phorid Flies can breed in a wider range of decaying matter, including drains, garbage disposals, and broken sewer lines.

The underlying source of most Fungus Gnat infestations is soil that remains wet for extended periods, usually due to overwatering or poor drainage. Adult females lay their eggs in the top two inches of the soil. The resulting larvae are translucent or whitish with a distinct black head. They spend their life cycle feeding on fungi and tender root hairs in the soil. Controlling the infestation requires addressing this wet environment where the larvae live and develop.

Environmental and Cultural Control Methods

The most sustainable method for controlling these pests involves manipulating the environment to make it inhospitable for breeding. Since Fungus Gnats require moisture to complete their life cycle, allowing the soil to dry out is the primary intervention. After watering, allow the top one to two inches of potting mix to dry completely before rewatering. This practice kills eggs and newly hatched larvae that cannot survive in dry conditions, and is especially important during cooler months when evaporation is reduced.

Improving container drainage is important to prevent standing water, which creates the moist conditions gnats favor. Ensure that plant saucers are emptied promptly and that the pot’s drainage holes are not blocked. A physical barrier can also be created on the soil surface to prevent adult females from laying eggs. Applying a quarter-inch layer of clean sand, perlite, or food-grade diatomaceous earth (DE) on top of the potting mix creates a dry, abrasive layer that deters egg-laying and desiccates pests attempting to cross it.

Maintaining cleanliness by removing fallen leaves and decaying plant debris from the soil surface eliminates potential food sources for the larvae. Using well-draining potting mixes that contain perlite or vermiculite, and avoiding incompletely composted organic matter, reduces moisture retention in the medium. These cultural practices disrupt the core conditions the pests need to survive.

Immediate Physical Removal and Trapping Techniques

While environmental changes address the source, immediate physical removal of the adult population is necessary to reduce breeding females and minimize the nuisance. Yellow sticky traps are highly effective because the bright color is attractive to adult Fungus Gnats. Placing these traps horizontally on the soil surface or inserting them just above the pot rim captures the low-flying adults before they can lay more eggs. These traps also serve as an excellent monitoring tool to track population changes.

Simple, liquid traps can be used to capture adult flies in the immediate vicinity. A shallow dish filled with apple cider vinegar, wine, or beer, combined with a few drops of dish soap, creates an effective lure. The gnats are attracted to the fermenting scent, but the dish soap breaks the surface tension of the liquid, causing the flies to sink and drown. For rapid reduction in a heavy swarm, a handheld vacuum cleaner equipped with a crevice tool can be used to suck up flying adults directly from the air or off plant surfaces.

Targeted Larval Elimination Strategies

Long-term eradication requires eliminating the larvae, which are the most damaging stage and perpetuate the infestation. The biological insecticide Bacillus thuringiensis subspecies israelensis (BTI) is a highly effective, naturally occurring soil bacterium that specifically targets fly larvae. When applied as a soil drench, BTI spores are ingested by the larvae, releasing a protein toxin that disrupts their digestive system and kills them within a few days. This method is safe because BTI is deadly only to the larvae of specific fly species, such as Fungus Gnats and mosquitoes, and does not harm beneficial insects, pets, or people.

To apply BTI, the product is mixed with water to create a solution, which is then used to thoroughly water the soil of all affected plants. Ensure the drench penetrates the top few inches where the larvae reside. Because BTI does not kill the eggs or pupae, repeated applications every seven to fourteen days for several weeks are necessary. This ensures all newly hatched larvae are exposed and the population cycle is halted.

Using Beneficial Nematodes

An alternative biological control involves the use of beneficial nematodes, specifically Steinernema feltiae. These microscopic, parasitic roundworms are mixed with water and applied as a soil drench. Once in the soil, Steinernema feltiae actively seek out and penetrate the fungus gnat larvae. They release symbiotic bacteria that multiply and kill the host within 24 to 48 hours. The nematodes reproduce inside the dead larvae, and a new generation emerges to continue searching for pests, offering ongoing control. This method is best used when soil temperatures are between 57 and 79 degrees Fahrenheit. The soil must be kept consistently moist for several days after application to allow the nematodes to move and hunt effectively.