How to Get Rid of Drain Flies in Your House

Drain flies, also known as moth flies or sewer gnats, are common household insects. These small, fuzzy insects are harmless to humans but indicate an underlying sanitation issue within the home’s plumbing system. Eradicating an infestation requires targeting the source: the organic material the larvae feed on. This guide provides a strategy for identifying these pests and eliminating their breeding grounds for long-term relief.

Identifying the Pest and Its Source

Proper identification is the first step in effective management, as drain flies are often mistaken for fruit flies or fungus gnats. Adult drain flies are small (2 to 4 millimeters) and have a fuzzy, moth-like appearance. They hold their wings in a roof-like position when at rest and are weak, erratic fliers, often seen walking or hopping.

The presence of these pests points to an accumulation of “biofilm,” a gelatinous sludge of organic matter, bacteria, and soap scum coating the inside of drain pipes. This material is the food source for the larvae, which develop within the slime layer. Common breeding locations include sinks, showers, bathtub drains, and utility room floor drains, especially those that are infrequently used.

To confirm the exact breeding source, use the “tape test.” Place a strip of clear adhesive tape over the opening of the suspected drain before bed, sticky side facing down. Do not completely seal the drain opening. If the drain is the source, adults or larvae will become stuck to the underside of the tape overnight, confirming the location requiring deep cleaning.

Quick Methods for Adult Fly Elimination

While identifying the source is necessary for permanent eradication, quick methods can immediately reduce the population of visible adult flies. Physical removal, such as using a fly swatter or vacuum cleaner, dispatches adults resting on surfaces. This provides temporary relief, but it does not affect the larvae developing deep inside the drain.

A highly effective, non-toxic method is setting a homemade trap using apple cider vinegar and dish soap. Place vinegar in a shallow dish with three to five drops of liquid dish soap. The vinegar’s odor attracts the flies, while the dish soap breaks the liquid’s surface tension.

When the flies attempt to land, they fall in and drown, preventing them from laying more eggs. Placing these traps near suspected drains captures adults and slows the reproduction cycle while the core issue is addressed. Avoid aerosol insecticides, as they are ineffective against the deeper infestation and are not registered for use in drains.

Comprehensive Treatment of the Breeding Site

The true solution for eliminating drain flies is removing the biofilm where the larvae develop. The first step involves physical removal, which breaks up the dense, slimy layer inside the pipe walls. Insert a flexible pipe brush or drain snake into the drain opening and P-trap to manually scrape away the accumulated organic material.

After scraping, a powerful flush is necessary to wash the loosened material down the pipe. While boiling water can be effective, caution is necessary with modern plumbing. Standard residential PVC drain pipes are rated for a maximum operating temperature of around 140°F (60°C). Pouring 212°F (100°C) boiling water can soften PVC and degrade glued joints, potentially leading to leaks.

A safer alternative is using the hottest tap water available, which is usually below the damaging threshold for PVC. Alternatively, use a less-than-boiling pot of water poured slowly down the drain.

DIY Cleaning Methods

A popular DIY method combines one cup of baking soda followed by one cup of white vinegar. This mixture creates a foaming reaction that helps loosen organic material clinging to the pipe walls. Follow this with a hot water flush after allowing the mixture to sit for several hours.

Bio-Enzyme Cleaners

For a deep, biological clean, bio-enzyme or bacterial drain cleaners are the recommended alternative to harsh chemical openers. Unlike chemical cleaners that may damage pipes, enzyme-based products use living bacteria and enzymes to slowly digest the organic matter, grease, and soap scum. This approach dissolves the biofilm without harming the plumbing, removing the layer drain flies rely on for survival.

Long-Term Strategies for Prevention

Once the drain has been thoroughly cleaned and the breeding site eliminated, routine maintenance is essential to prevent the drain flies from returning. The core of long-term prevention is ensuring that a new layer of biofilm does not have the opportunity to form inside the pipes. This involves a weekly routine of flushing the affected drains with hot water to discourage organic buildup.

Continuing to use bio-enzyme drain cleaners on a monthly or bi-weekly schedule serves as a preventive measure. These products keep the organic matter broken down, effectively removing the food source the larvae need. This consistent application is far more effective than relying on a sporadic deep clean only after an infestation has begun.

Attention should also be paid to drains that are used infrequently, such as basement floor drains or guest bathroom sinks. Water in these P-traps can evaporate, creating a dry environment where biofilm can still accumulate. Ensuring these drains are regularly run with water, or occasionally treated with a small amount of mineral oil to slow evaporation, helps maintain proper sanitation.