Drain flies — also called moth flies or sewer gnats — are small, fuzzy-winged insects about an eighth of an inch long that appear near drains, particularly in bathrooms and kitchens. They don’t bite, they don’t carry disease, and they don’t damage your plumbing. What they do is breed prolifically in the organic biofilm inside drain pipes, and once they’re established, they keep reappearing until the breeding environment is eliminated.
Most drain fly infestations are a straightforward drain cleaning problem. But persistent drain flies that keep coming back despite cleaning can be a sign of something more significant — a cracked pipe, a leaking drain connection, or a slow sewer issue that’s creating a wet organic environment somewhere in the wall or under the floor. That’s why a plumber’s blog is a reasonable place to cover this topic.
Confirming It’s Drain Flies
Drain flies are distinctive: small, fuzzy, moth-like, and typically seen resting on walls or ceilings near drains rather than flying actively. They’re most active in the evening. Unlike fruit flies (which are attracted to food and fruit), drain flies cluster around drains and wet areas.
To confirm which drain is the source, tape a piece of clear plastic wrap loosely over each suspect drain opening before bed, leaving a small gap at the edges for airflow. Check in the morning — flies emerging from the drain will be caught on the tape’s underside. This tells you exactly which drain to focus on.
Why Santa Cruz Homes Get Them
Drain flies need two things: moisture and organic material to breed in. Santa Cruz’s coastal humidity means drains in less-ventilated bathrooms — particularly in older homes with limited ventilation — stay damp enough to support fly populations year-round. The biofilm that accumulates naturally in drain pipes (from hair, soap, food residue) gives them everything they need to reproduce.
Vacation rentals and properties that sit vacant are especially susceptible: drains that go unused for extended periods develop thicker biofilm buildup and sometimes dry P-traps that allow sewer insects to travel up from the line.
How to Eliminate Them
The only reliable way to eliminate drain flies is to remove their breeding environment — the biofilm inside the pipe. Killing the adult flies with sprays or traps provides temporary relief but does nothing about the larvae in the drain, and the population rebounds within days.
Step 1: Mechanical Cleaning
Remove the drain cover or stopper and clean it thoroughly — biofilm accumulates heavily on the underside of stoppers and the interior of drain covers. Use a stiff brush or old toothbrush.
Then clean the pipe itself. A flexible drain cleaning brush — the type sold for cleaning drains, with stiff bristles — run several inches into the pipe scrubs the biofilm from the walls more effectively than any liquid treatment. This is the most important step. The larvae live in the biofilm on the pipe wall, not in the water.
Step 2: Enzyme Treatment
After mechanical cleaning, pour an enzyme drain cleaner down the drain and let it sit overnight. Enzyme cleaners contain bacteria that consume organic material — they continue breaking down biofilm between cleanings and are safe for pipes and septic systems. They’re available at hardware stores and online. Use them weekly for 2–3 weeks after the initial cleaning to prevent the biofilm from reestablishing.
Don’t use caustic chemical cleaners (Drano, bleach). They don’t remove biofilm effectively, they can damage older pipes with repeated use, and they kill the beneficial bacteria in enzyme treatments if used together.
Step 3: Address Dry P-Traps
If drain flies are appearing from a floor drain, utility sink, or any drain that doesn’t get regular use, the P-trap may have dried out, allowing flies to travel up from the sewer line. Run water down all infrequently-used drains to refill the traps. For floor drains, add a tablespoon of cooking oil to the trap after refilling — it floats on the water and slows evaporation.
Step 4: Eliminate Standing Moisture
Drain flies can also breed in any area of consistent moisture: under a leaking sink, in a damp area around a toilet base, in standing water in a condensate pan under an HVAC unit. Check for any moisture sources near where the flies are appearing and address them.
When Cleaning Doesn’t Work
If you’ve cleaned the drain thoroughly and treated it with enzyme cleaner consistently for several weeks, and drain flies keep reappearing, the breeding site may not be inside the visible drain pipe.
The most common hidden sources:
Cracked or leaking drain pipe in the wall or floor. A pipe that’s dripping into the wall cavity or under the subfloor creates exactly the kind of persistently wet organic environment drain flies need. The flies emerge from the crack or from a nearby drain opening, but the actual breeding site is inaccessible without opening the wall. This situation is also typically accompanied by a musty smell and sometimes by discoloration or soft spots on nearby drywall or flooring.
Sewer line with slow or partial blockage. A drain line with significant buildup deeper in the system — past what a brush and enzyme treatment can reach — can harbor fly populations that continuously replenish the visible portion of the pipe.
Leaking wax ring at the toilet base. A failing wax ring allows sewer water to seep under the toilet with each flush, creating a chronically damp organic area under the floor that drain flies can breed in. Signs include a toilet that rocks slightly, soft flooring around the base, or a persistent odor at floor level.
If any of these seem likely, a plumber can inspect the drain and sewer line. A sewer camera inspection is the definitive way to check for cracks, buildup, or damage inside a drain line that surface cleaning can’t address. Leak detection can locate hidden moisture in walls or under floors without opening them up blindly.
Preventing Recurrence
Once the drain is clean and the fly population is eliminated:
- Run an enzyme drain cleaner monthly in bathroom drains as a maintenance habit
- Clean drain stoppers and covers every few weeks
- Run water down all infrequently-used drains at least monthly to keep P-traps filled
- Address any slow drains promptly — the buildup that causes slow drainage is the same buildup drain flies breed in
Eco-Flow Plumbing Inc. — Santa Cruz
If drain flies persist despite thorough cleaning and you suspect a hidden pipe issue, we can help diagnose it. Eco-Flow Plumbing Inc. serves Santa Cruz, Live Oak, Aptos, Capitola, Soquel, Scotts Valley, Seabright, Felton, Boulder Creek, and Watsonville.
Contact Eco-Flow Plumbing to schedule service. Or call directly: (831) 818-6331.
This article was written by Scott Liess, founder of Eco-Flow Plumbing and a licensed plumbing contractor with over 18 years of experience serving the Santa Cruz community.


