The short answer

To get rid of drain flies, stop them at the drain they breed in. Find the source drain by taping over it overnight, scrub the biofilm off the inside of the drain with a stiff brush, then seal the drain opening so new adults cannot come up. Sprays and bleach kill the flies you see, not the larvae inside the pipe.

You call pest control. They spray. The drain flies come back in a week. You try bleach, enzyme cleaners, boiling water. They come back again. This cycle repeats in restaurants, hospitals, schools, and commercial buildings across the country because every one of these treatments targets the symptom, not the cause. The flies are not the problem. The open drain is the problem.

Cutaway illustration of drain flies inside a kitchen floor drain above the trap

This article explains exactly why drain flies persist despite repeated treatment, why sprays miss the breeding site and pour-down treatments only partly reach it, and what the only permanent solution actually looks like.

What drain flies are

Drain flies (Psychodidae) go by many names: moth flies, filter flies, sewer flies, sewer gnats and drain gnats, or sink flies and bathroom flies, depending on where people find them. They are all the same small, fuzzy-winged insect, roughly 2 to 5 millimeters long. They are weak fliers, often found resting on walls and ceilings near drains. They do not bite. They do not fly far. But they reproduce rapidly and in large numbers, making them one of the most persistent pest complaints in commercial buildings.

Drain flies are not random invaders from outside. They live, breed, and feed inside your building's drain system. Understanding their lifecycle is essential to understanding why conventional treatments fail. For a stage-by-stage breakdown, see the full drain fly life cycle.

The drain fly lifecycle

A drain fly's entire life revolves around the gelatinous biofilm that coats the interior walls of drain pipes. This biofilm, a mixture of bacteria, fungi, organic matter, grease, and moisture, is the perfect breeding environment.

48 hrs Eggs hatch in 32 to 48 hours
8-24 days Full lifecycle from egg to adult
15-40 Eggs in a typical batch (up to 100)

Eggs

Female drain flies lay their eggs in irregular masses directly on the biofilm surface inside drain pipes, most often 15 to 40 at a time and sometimes up to 100. The eggs are pale, elongated, and nearly invisible to the naked eye. They are laid in the moist, protected environment deep inside the pipe, not at the drain opening where you might see them. Eggs hatch in 32 to 48 hours under warm conditions.

Larvae

The larvae are the key stage. They are legless, translucent, and roughly 4 to 10 millimeters long. They live inside the biofilm, feeding on the bacteria, fungi, and organic sediment that make up its structure. The larval stage lasts 9 to 15 days. During this time, the larvae are fully protected by the biofilm layer. They are not exposed to the water flowing through the drain, and they are not accessible to chemical treatments poured down the drain opening. For how to recognize them and confirm which drain they are breeding in, see our guide to drain fly larvae.

Pupae

After the larval stage, the flies pupate near the surface of the biofilm for 20 to 40 hours. Pupae are stationary and similarly protected by their position within the pipe.

Adults

Adult drain flies emerge from the pipe and live for approximately 14 to 20 days. During this time, females lay multiple egg batches back in the biofilm. A single breeding pair can produce hundreds of offspring in the drain system within weeks.

The short film below shows where they breed inside a drain, the three small flies people most often mix up, and how a sealed drain closes the way out.

The lifecycle lives inside the drain

Egg to adult in 8 to 24 days, entirely inside the pipe.

Eggs
15 to 40 per batch (up to 100), hatch in 32 to 48 hours
Larvae
9 to 15 days feeding inside the biofilm
Pupae
20 to 40 hours near the biofilm surface
Adults
Live 14 to 20 days, lay eggs back in the drain

Every stage is protected by the biofilm layer, which is why treatments poured into the drain opening do not reach them.

Drain flies complete their entire reproductive cycle inside the biofilm that coats drain pipe walls. Adults emerge through the drain opening to enter occupied spaces.

Why chemicals fail

The pest control industry and building maintenance teams have tried every chemical approach. None of them provide a permanent solution. Here is why.

Bleach

Bleach kills adult drain flies on contact. It does not penetrate the biofilm where larvae live. Biofilm is a structured microbial community with a protective extracellular matrix that resists chemical penetration. Pouring bleach down a drain may kill adults and surface-level organisms, but the larvae embedded in the biofilm survive. New adults emerge within days.

Enzyme and biological drain cleaners

Enzyme-based cleaners are designed to break down organic matter in drain biofilm. In theory, this attacks the breeding substrate. In practice, enzyme cleaners work slowly, require repeated application, and rarely eliminate the entire biofilm layer. The biofilm in a commercial drain system extends for feet or meters along the pipe interior. A single treatment from the drain opening cannot reach the full extent of the colony.

Boiling water

Boiling water kills organisms it contacts directly. By the time it travels through the drain body and into the pipe, the temperature has dropped significantly. It contacts only a fraction of the biofilm surface. Like bleach, it provides temporary reduction in adult fly numbers but does not address the larvae protected deeper in the pipe system.

Insecticide sprays and foggers

Conventional insecticides target adult insects in occupied spaces. They do not reach the breeding site inside the drain pipe. Spraying a room where drain flies are present kills the adults currently flying but does nothing to the next generation developing in the biofilm below.

Why sprays fall short: Sprays and foggers treat the room, not the pipe. They reach the adults in the air and on the walls, not the eggs and larvae in the biofilm inside the drain, so a new generation keeps coming up. Treating the room alone does not end the problem; the breeding site has to be cleaned and the way out closed.

Why the cycle repeats

Every chemical treatment follows the same pattern: temporary reduction in adult fly numbers, followed by re-emergence from the surviving larvae in the biofilm. The lifecycle is so short (8 to 24 days from egg to adult) that even aggressive weekly treatments cannot outpace the reproductive rate. As long as the biofilm exists inside the pipe and the drain opening remains unsealed, new adults will continue to emerge.

Where drain flies are worst

Drain flies thrive in any environment with organic-rich biofilm and warm, moist conditions. Pest emergence from drains is one of the most common floor drain problems in commercial buildings, and a recurring callback for pest control operators. The worst infestations typically occur in:

Trench drain grate in a working commercial kitchen
  • Restaurants and food service. Grease, food particles, and warm kitchen environments create ideal biofilm conditions. Drain flies in food prep areas are a direct health code violation in most jurisdictions.
  • Bars and breweries. Sugar-rich beverage waste accelerates biofilm growth in floor drains and bar sinks.
  • Commercial kitchens and cafeterias. High-volume food preparation generates continuous organic waste that feeds biofilm.
  • Hospitals and healthcare facilities. Shower drains, handwashing station drains, and floor drains in patient areas. In healthcare settings, drain flies are not just a nuisance; they can transport bacteria from contaminated biofilm into clinical environments.
  • Hotels and resorts. Bathroom drains in unoccupied rooms where P-traps have dried out become open pathways for drain fly emergence.
  • Schools. Cafeteria drains and restroom drains, especially after extended breaks when traps dry out. Physical drain sealing is particularly important in schools because IPM regulations restrict chemical pesticide use, which makes a seal at the drain the practical option.

The health and compliance problem

Drain flies are more than an aesthetic nuisance. They create real compliance and health risks for commercial facilities.

Health code violations

In food service environments, the presence of drain flies during a health inspection can result in point deductions, mandatory re-inspection, or in severe cases, temporary closure. Health inspectors understand that drain flies indicate a systemic sanitation issue, not a one-time pest event. Repeat violations can affect a restaurant's public health rating and customer trust.

Bacterial contamination

Drain flies emerge from biofilm that contains bacteria, mold, and other microorganisms. Their bodies and wings carry these organisms into the occupied space. Studies have identified pathogenic bacteria on the bodies of drain flies collected from hospital and food service environments. While drain flies do not bite or transmit disease through biting, they can mechanically transfer contaminants to surfaces, food preparation areas, and patient care environments. For a closer look at whether drain flies spread disease, see our dedicated guide.

Allergens

In heavy infestations, dead drain flies and their fragments become airborne. These fragments are documented respiratory allergens. Facility occupants with asthma or allergic sensitivity may experience symptoms in buildings with chronic drain fly problems.

The only permanent solution: seal the entry point

If chemicals cannot eliminate the breeding site, and the breeding site will always exist inside drain pipes (biofilm is a natural and inevitable byproduct of organic waste flowing through plumbing), then the only permanent solution is to prevent the adult flies from traveling from the pipe into the occupied space.

This means sealing the drain opening.

A properly functioning P-trap water seal blocks drain flies coming up from the sewer side, but only as long as the water remains in the trap, and flies breeding in the biofilm above the water are already on the room side of it. In floor drains that do not receive regular water flow, the trap dries out in 2 to 3 weeks. Once the water is gone, the drain is an open pipe and the flies have a clear path into the building.

A waterless trap seal solves this permanently. Green Drain is a waterless floor drain seal that blocks the breeding site from the occupied space: a one-way silicone valve that drops into the existing floor drain body. It allows water to flow down (for cleaning, mopping, or equipment drainage) but creates a physical barrier that prevents anything from coming back up, including drain flies, sewer gas, odors, and other pests.

Because the seal is mechanical, not liquid, it never evaporates. It works during building closures, overnight, over weekends, and through extended vacations. There is nothing for the flies to get through, regardless of how active the biofilm is below.

Cutaway of a kitchen floor drain with a Green Drain valve sealing the opening and drain flies contained below
A waterless trap seal creates a physical barrier that drain flies cannot pass through, regardless of biofilm conditions in the pipe below.

What to do right now

If you are dealing with a drain fly problem, here is a practical action plan:

  1. Identify the source drains. Place clear tape or plastic wrap over suspected drain openings overnight. Flies emerging from the drain will get caught on the covering. This tells you exactly which drains are the source.
  2. Clean the drains mechanically. Use a stiff brush to physically scrub the inside of the drain body. This removes the accessible biofilm and reduces the immediate fly population. Chemical treatments are optional and supplementary at this stage.
  3. Seal the drains. Install a waterless trap seal in each drain identified as a source. This is the step that makes the fix permanent. Without it, the flies will return. To pick the size, lift the grate or strainer and measure the round pipe opening below it, inside wall to inside wall; the size chart matches that reading to a model. Shower and sink drains are measured the same way.
  4. Address adjacent drains. If one drain in an area has drain flies, adjacent drains likely have biofilm as well. Seal all the drains in the affected zone, not just the ones with visible fly activity.

Measure your drain, find your model in the size chart, then shop Green Drain. For a whole facility, request a quote.

Frequently asked questions

How long do drain flies live?

Adult drain flies live about 14 to 20 days, but the full cycle from egg to adult takes only 8 to 24 days. That short, overlapping cycle is why the problem persists: females lay their eggs in batches of 15 to 40, sometimes up to 100, in the biofilm inside the pipe, so killing the adults you can see does nothing to the eggs and larvae protected below. New adults keep emerging until the drain itself is sealed.

What causes drain flies?

Drain flies are caused by the combination of biofilm buildup inside drain pipes and an open pathway from the pipe to the building interior. The flies breed and lay eggs in the gelatinous biofilm that forms on the interior walls of drain pipes. They enter occupied spaces through floor drains, sink drains, and any drain opening that lacks a functioning seal.

Can bleach kill drain flies?

Bleach can kill adult drain flies on contact, but it does not solve the problem. Bleach cannot penetrate the biofilm layer where drain fly larvae live and feed. The biofilm protects the eggs and larvae from chemical treatments. Within days of a bleach treatment, new adults emerge from the surviving larvae in the biofilm. The only permanent solution is sealing the drain opening to prevent the flies from entering the building.

How do I permanently get rid of drain flies?

The only permanent solution is to seal the drain opening so flies cannot travel from the pipe into the building. Waterless trap seals like Green Drain create a physical one-way barrier that allows water to flow down but prevents flies, gas, and odors from coming back up. Unlike chemicals, this approach works continuously without reapplication.

Are sewer flies, sink flies and drain gnats the same as drain flies?

Yes. Sewer flies, sewer gnats, drain gnats, moth flies, filter flies, sink flies and bathroom flies are all common names for the same small, fuzzy drain fly (Psychodidae). The fix is the same whatever you call them: find the drain they come from, scrub the biofilm off its walls, and seal the opening. Fruit flies and phorid flies are different insects, but both can also breed in the biofilm inside drains.

Are drain flies harmful?

Drain flies do not bite or transmit diseases through biting. However, they are a significant sanitation concern. In food service environments, their presence can trigger health code violations. They carry bacteria from drain biofilm on their bodies and can contaminate food preparation surfaces. In large numbers, dead drain flies become airborne allergens. In healthcare settings, they can transport pathogens from contaminated drain biofilm into clinical areas.