NC State Extension Publications


Drain flies (also known as "moth flies" or "filter flies") are a common nuisance in / around homes and commercial buildings, including sewage treatment plants. Adult flies may become so numerous indoors that they congregate at windows, around light fixtures, and around showers, bathtubs, sinks and floor drains. They can annoy people sitting indoors or outdoors. Since these flies often originate in unsanitary conditions, there is the possibility of disease transmission that can affect human health.


Skip to Identification

Adult drain flies are small (16 to 15 inch long), fuzzy, dark colored insects with the body and wings densely covered with hairs . Their wings appear large for their body, are held roof-like over the body when at rest, giving them a mothlike appearance. They are weak fliers and fly only a few feet at a time. Larvae are legless, about 38 inch long, wormlike and gray, with both ends somewhat darker.

Drain fly adult

Figure 1. Drain fly adult.

Matt Bertone, NC State

picture of a drain fly larva

Figure 2. Drain fly larva.

Matt Bertone, NC State

Life Cycle and Habits

Skip to Life Cycle and Habits

Drain flies breed in polluted, shallow water or highly moist organic solids. You will find the eggs, larvae and pupae in the muck, slime, or gelatinous film often accumulating on the sides of drains (Figure 3) and condensate pipes for air conditioners (Figure 4), in the sewage filtration tanks, septic tanks and moist compost. Other breeding sites include dirty garbage containers, rain barrels and tree holes or in lowlying areas adjacent to buildings where stormwater collects and algae or mold grows. The female flies deposit laid eggs in irregular masses of 10 to 200 directly in / on moist organic debris. These eggs usually hatch in less than two days and the larvae feed on the decaying organic matter, microorganisms, algae and sediment in the debris and mature in 9 to 15 days. Larvae pupate in / on the surface of this material and new adults emerge in 1-2 days.

slime in floor drain

Figure 3. Gelatinous buildup in drains can lead to drain fly problems.

M. Waldvogel, NC State

Figure 4. Drain flies often lay eggs in the muck collecting on d

Figure 4. Drain flies often lay eggs in the muck collecting on drain pipes.

Correcting Drain Fly Problems

Skip to Correcting Drain Fly Problems

Non-Chemical Control

The key to solving a drain fly problem is to find and eliminate the source, i.e., find the areas of excess moisture and a buildup of organic debris.

Areas that are likely to be a source of moth fly infestations outdoors include:

  • Damaged or faulty septic lines
  • Areas where rainwater tends to pool or where air conditioning condensate lines drain, particularly if the area is shaded and algae or mold is growing on the soil or foundation (Figure 5)
  • For commercial buildings - check the area (usually a concrete or gravel covered) beneath air condition cooling units on roofs or adjoining the building

If a local source of the flies cannot be found, it is possible that the flies are being carried on wind currents from a nearby sewage treatment plant or another faulty septic system.

Areas that are likely to be a source of moth fly infestations indoors include:

  • Toilets (particularly if they are not used frequently). Be sure to check the toilet tank, as well.
  • Sink and bathtub / shower drains
  • Floor drains in commercial buildings and basements (Figure 6)
  • Condensate lines for icemakers
  • Loose ceramic floor tiles where water may collect

One way to determine if the flies are coming from a particular drain is to cover the drains with glue boards (elevated on cardboard "collars" to keep them from sticking to the floor or drain. There is also a simple method that you can use at home. Take a translucent container (e.g., a margarine container) and coat the inside with a thin layer of petroleum jelly. Place the container upside down over the drain and leave it in place overnight or for a few days, but check it daily. Emerging flies should be trapped in the petroleum jelly. In commercial buildings, the source of the problem may be more difficult to identify. Pest control companies often use blacklight traps indoors to determine areas where the flies are most numerous and then proceed with a thorough inspection of the area.

The most effective method to correct (or to prevent) drain fly problems is to clean toilets, drainpipes and traps to eliminate any gelatinous rotting, organic matter, thereby eliminating the larval food source. Many of the commercially-available drain and toilet bowl cleaners can be used for this purpose. Many of these cleaners are biodegradable and pose less of a hazard to the environment. If you have a septic system, read the product labels carefully to make sure that the product is compatible with the system (i.e., will not disrupt the microbial action in the septic tank). Routine cleaning of floor and sink drains is important particularly in commercial establishments.

Alternative methods include cleaning pipes and traps with a good, stiff, long-handled brush. It is best to remove the drain trap and use a plumber's "snake" in clogged drains to dislodge the gelatinous material in the drains. If you use mechanical cleaning methods, you should also flush the lines with boiling water and bleach to remove any material left behind. Caustic drain cleaners may also be used, although they are not necessarily as effective as other cleaning methods. IMPORTANT: NEVER rinse a drain with bleach after using a caustic drain cleaner. Mixing of these two chemicals in the drain line may produce chlorine gas, which is extremely hazardous to anyone who inhales it.

Chemical Control

Indoors, aerosol sprays of pyrethrins (or other "flying insect" sprays) will kill adult drain flies, giving temporary control, but they are not a real fix for the problem. If the drain flies are coming from an outdoor source, exterior applications of any common residual sprays for flies can be made around windows for temporary relief until the source of the infestation can be found and eliminated. Examples of such pesticides can be found in the North Carolina Agricultural Chemicals Manual. The insect growth regulator methoprene (Strike®) is registered for use in municipal wastewater treatment facilities to control midges and drain (filter) flies. Always read the label and follow directions and safety precautions.

Figure 5. Drain flies can accumulate in areas where air conditio

Figure 5. Drain flies can accumulate in areas where air conditioning condensate lines drain.

Figure 6. Floor drains in commercial buildings offer areas for d

Figure 6. Floor drains in commercial buildings offer areas for drain flies to reproduce and congregate.


Some information in this publication was taken from W. Lyon, Ohio State University


Extension Specialist (Household & Structural Entomology)
Entomology and Plant Pathology
Training Coordinator
Entomology and Plant Pathology

Find more information at the following NC State Extension websites:

Publication date: June 30, 2018

Recommendations for the use of agricultural chemicals are included in this publication as a convenience to the reader. The use of brand names and any mention or listing of commercial products or services in this publication does not imply endorsement by NC State University or N.C. A&T State University nor discrimination against similar products or services not mentioned. Individuals who use agricultural chemicals are responsible for ensuring that the intended use complies with current regulations and conforms to the product label. Be sure to obtain current information about usage regulations and examine a current product label before applying any chemical. For assistance, contact your local N.C. Cooperative Extension county center.

N.C. Cooperative Extension prohibits discrimination and harassment regardless of age, color, disability, family and marital status, gender identity, national origin, political beliefs, race, religion, sex (including pregnancy), sexual orientation and veteran status.