Getting rid of drain flies requires removing the slimy organic buildup inside your pipes where they breed. Killing the adults you see flying around won’t solve the problem, because new ones emerge every 8 to 24 days from eggs laid deep inside your drains. The key is eliminating their breeding habitat through physical cleaning, then keeping drains clear so they don’t return.
Why Drain Flies Keep Coming Back
Drain flies lay their eggs on the gelatinous biofilm that coats the inside of wet pipes. This slime, made up of grease, hair, soap scum, and decomposing organic matter, is both their nursery and their food source. Eggs hatch within about two days, and larvae spend 8 to 15 days feeding on the film before pupating and emerging as adults. Adults live another two to three weeks, laying new eggs the entire time.
This rapid lifecycle is exactly why spraying adults or pouring chemicals down the drain rarely works as a standalone fix. Even aggressive weekly treatments can’t outpace the reproductive rate if the biofilm remains intact. A single missed generation repopulates the drain within days.
Find the Breeding Source First
Before you start cleaning, confirm which drain is the problem. The most common indoor breeding sites are bathroom sink drains, shower drains, bathtub drains, and kitchen sink drains, especially ones with visible slime buildup. But drain flies also breed in less obvious spots:
- Sink overflow holes: the small opening near the rim of bathroom sinks traps moisture and organic matter inside a hidden channel
- Toilet bases: particularly if there’s a slow leak or poor seal
- Floor drains: basement and garage drains that don’t get regular water flow lose their trap seal in two to three weeks, creating an open path from the sewer
- Leaking pipes behind walls or under slabs: wet organic debris around a hidden leak can harbor larvae without any visible drain involved
- Miscellaneous damp spots: wet mop heads, dirty garbage cans, condensation drip pans under appliances, and clogged gutters
A simple test: place a strip of clear tape over a suspect drain at night, sticky side down, leaving enough gap for airflow. Check it in the morning. If you find small flies stuck to the tape, you’ve found a breeding source. Test multiple drains at once, because infestations sometimes involve more than one.
Scrub the Pipes Manually
Physical removal of the biofilm is the single most effective step. No chemical or home remedy substitutes for this. Use a stiff, long-handled drain brush (sometimes called a tube brush or pipe brush) and run it up and down the inside of the pipe, scrubbing the walls to break the gelatinous film loose. For sink drains, remove the U-trap underneath and clean out any buildup you find inside it. If the drain is badly clogged, a plumber’s snake can dislodge material further down the line.
After brushing, flush the drain thoroughly with hot water to wash loosened material downstream. This process physically destroys the eggs, larvae, and pupae embedded in the slime, which is something no pour-down product can reliably do on its own.
When Boiling Water or Vinegar Helps (and When It Doesn’t)
For a minor infestation where you’ve only spotted a few flies, pouring boiling water down the drain can temporarily melt grease buildup near the top of the pipe and flush it downward. Similarly, pouring one cup of vinegar followed by half a cup of baking soda creates a fizzing reaction that loosens organic matter near the drain opening.
Both methods share the same limitation: they only treat the top portion of the drain. If the biofilm extends further down the pipe, the boiling water cools and the vinegar solution becomes diluted before it reaches the problem. Drain flies simply rebuild from the untouched sections below. These are reasonable first attempts for a brand-new, mild problem, but they won’t resolve a moderate or heavy infestation on their own. Think of them as supplements to mechanical cleaning, not replacements.
Enzyme Drain Cleaners vs. Chemical Drain Cleaners
Standard chemical drain cleaners (the harsh, lye-based products) are not effective against drain flies. They’re designed to dissolve hair clogs, not strip biofilm from pipe walls, and they flow past the slime layer without fully removing it.
Enzyme-based or microbial drain cleaners work differently. They contain bacteria or enzymes that digest organic matter over time, gradually breaking down the biofilm. These products are a useful follow-up after you’ve done the initial manual scrubbing. Pour them in according to the label directions (typically at night when the drain won’t be used for several hours) and repeat over one to two weeks. They help prevent the biofilm from rebuilding but are too slow-acting to eliminate an active infestation by themselves.
Dealing With Adult Flies During Cleanup
While you’re working on the breeding source, you’ll still see adults for one to three weeks as the remaining pupae finish developing. You can reduce their numbers with a few approaches. A standard fly swatter works fine since drain flies are slow, weak fliers. Sticky traps placed near problem drains catch adults passively. Some pest control products combine an adulticide with an insect growth regulator that disrupts the development cycle, preventing larvae from maturing into reproducing adults. These can help bridge the gap while your cleaning efforts take hold.
The important thing to understand is that killing adults is damage control, not a solution. If you’re only swatting flies without addressing the biofilm, the population will sustain itself indefinitely.
How Long Until They’re Gone
After you remove the breeding habitat, expect to keep seeing some adult drain flies for up to two to three weeks. That’s the time it takes for any remaining pupae and late-stage larvae (which may have survived in small pockets of residual film) to emerge and die off without being able to reproduce successfully. If you’re still seeing new flies after three weeks, you either missed a breeding source or the biofilm wasn’t fully removed. Go back to the identification step and check overflow holes, secondary drains, and hidden moisture sources.
For stubborn cases, repeat the brush-and-flush process every few days for two weeks. This ensures you’re catching new larvae before they can complete their development cycle.
Preventing Drain Flies From Returning
Once you’ve cleared the infestation, prevention comes down to keeping pipes clean and dry spots sealed:
- Run water regularly in every drain, including guest bathrooms, basement floor drains, and utility sinks. Drains that sit unused lose their water trap seal in two to three weeks, giving flies a direct route in from the sewer.
- Clean drain stoppers and strainers weekly to remove hair and soap buildup before it migrates into the pipe.
- Flush drains monthly with boiling water or an enzyme cleaner to prevent biofilm from accumulating again.
- Fix leaks promptly. A dripping pipe behind a wall or under a slab creates exactly the kind of moist, organic-rich environment drain flies seek out. If flies appear in areas far from any visible drain, a hidden plumbing leak is a likely cause and worth having a plumber investigate.
- Consider a drain seal for floor drains that rarely get used. Waterless trap seal inserts act as one-way valves, allowing water to flow down while blocking flies, odors, and sewer gas from coming back up.
When the Problem Is Bigger Than a Dirty Drain
If drain flies persist despite thorough cleaning of every accessible drain, the breeding source may be somewhere you can’t reach with a brush. A broken sewer pipe under a concrete slab is one of the more common hidden culprits. Kitchen wastewater leaking into foundation soil creates a nutrient-rich breeding ground that no amount of surface-level drain cleaning will fix. The telltale sign is drain flies appearing throughout the house, including in rooms without drains, or concentrated in basements.
A plumber can run a camera inspection through your sewer line to check for cracks, separations, or bellied sections where organic matter pools. This is worth pursuing if you’ve been battling drain flies for more than a month without success, because it often reveals a structural plumbing issue that would cause other problems down the road regardless.