Short answer
Drain flies need two things: a film of organic gunk and a spot wet enough, long enough, for that film to build up. A drain supplies both, but so does a humidifier tray, an AC drip pan, or a plant saucer nobody empties. Run every drain on a schedule, scrub the film instead of bleaching it, and check the standing water that isn’t in a drain at all.
- Run water in every drain you have, including the guest bathroom and any floor drain, at least once a week.
- Scrub the film with a stiff brush or an enzyme cleaner. Bleach and boiling water do not remove it; the removal guide covers why.
- Check for standing water outside the drains: AC pans, humidifier trays, plant saucers, and the gasket of the washing machine.
Why a clean kitchen still gets drain flies
The insect isn’t eating anything you’d call food. The University of California Statewide IPM Program describes drain fly larvae feeding on the bacteria, fungi and algae growing in the gelatinous film that coats the inside of a slow-draining pipe. Ohio State University Extension calls that film “bacterial scum,” a buildup of decaying organic matter, and says the single most effective way to stop an infestation is to eliminate it before it forms. That’s a different target than most people aim at. Wiping a counter or scrubbing a sink’s outer bowl does nothing to the wall of a pipe three inches down.
This is also why prevention has to start before you see a fly. A female lays eggs in masses, and Ohio State puts egg hatch at 32 to 48 hours at 70°F, with the full life cycle running 8 to 24 days depending on temperature, per UC IPM. A film that’s a week old is already a nursery.
Run the water you normally skip
The drain fly’s favorite target isn’t the sink you use every day. Moving water keeps a film thin, so the pipe most at risk is the one that sits still: a guest bathroom, a basement floor drain, a utility sink, the overflow on a tub nobody fills. University of Kentucky Entomology notes that drain flies are often a problem people first notice after a vacation, one that fades again once household water starts moving through the pipes as usual.
Put a reminder on your phone instead of trusting memory. Run the tap or flush the toilet in every fixture you don’t use daily, once a week is enough, and do it for a full 30 seconds so the water actually clears the trap. If a drain in the house gets used maybe twice a year, that’s exactly the drain growing a film right now.
Scrub the film. Don’t just rinse it
Ohio State is blunt about this: bleach doesn’t get rid of the scum, and the larvae are, in the fact sheet’s words, “surprisingly resistant to bleach.” UC IPM calls boiling water and bleach a misconception, good for short-term control at best, because neither one strips a gel that’s bonded to the pipe wall. A rinse is a few seconds of contact with something that needs scraping.
What works is mechanical: a stiff, long-handled brush worked in circles against the pipe wall, not just swept through the water at the bottom of the trap. If the drain has a removable trap, take it off and clear the film directly instead of fighting it from above. Ohio State’s preferred follow-up is an enzyme-action product made to break down the bond between the bacteria, algae and the pipe, used on a routine rather than once as a cure.
Never follow bleach with a caustic cleaner. Ohio State Extension warns that a caustic, lye-based drain cleaner must never be used right after bleach: mixing the two in the drain line can release chlorine gas. If you’ve used one, flush thoroughly with plain water before reaching for the other.
The water that isn’t in a drain at all
A pipe is the obvious place to look, which is exactly why it isn’t the only one. Ohio State’s prevention list reads less like plumbing advice and more like a scavenger hunt for water you forgot about: standing water in a houseplant saucer, a humidifier’s reservoir tray, condensation collecting under an air conditioner, a bird bath, an above-ground pool cover pooling rain. None of these have a trap or a strainer, so nothing stops a film from forming the same way it does in a pipe.

The washing machine belongs on that list too. Ohio State specifically calls out wet lint collecting under the machine, and the rubber door gasket on a front-load washer holds the same kind of damp residue a drain pipe does, just somewhere people rarely look. Wipe the gasket dry after a load now and then, and pull the lint trap or filter instead of assuming the machine handles it.
Garbage containers count as well. Ohio State recommends cleaning dirty cans and emptying them often, since a liner that leaks into the bottom of a kitchen or outdoor trash can builds the same film a pipe does, just with food scraps instead of pipe scale.
A monthly prevention routine
None of this takes long on its own. The trouble is remembering it exists. Put these on a recurring calendar reminder rather than relying on noticing a fly first.
| Where | What to do | How often |
|---|---|---|
| Every drain, including rarely used ones | Run water for 30 seconds to flush the trap | Weekly |
| Kitchen and bathroom drains | Scrub the pipe wall with a stiff brush, then an enzyme cleaner | Monthly |
| Washing machine gasket and lint trap | Wipe dry and clear trapped lint | Monthly |
| Plant saucers, humidifier trays, AC pans | Empty any standing water, don’t just top it up | Weekly |
| Garbage cans, indoor and outdoor | Rinse out and let dry before relining | Every emptying |
Why monthly, not once a year. A film can hatch flies within the 8 to 24 day cycle UC IPM gives for this insect. A drain scrubbed in January and ignored until June has had five or six full generations to rebuild what you cleared.
When the source is outside your house
Sometimes the routine above won’t touch the problem, because the breeding site was never indoors. Ohio State notes that a nearby sewage filter plant, a commercial cooling tower, or mulch kept constantly wet by an irrigation system can all produce drain flies that drift in on the wind, in large numbers, from up to a mile away. UC IPM makes the same point: very large numbers of flies usually mean a development site bigger than a household’s own drains.
The tell is simple. If you’re seeing more of them outside near a window or vent than you ever find near a sink, scrubbing your own pipes changes nothing. Check for a soggy mulch bed, a leaking outdoor spigot, or standing water around a sprinkler head before assuming the house is the source.
If they already showed up
One or two flies on a bathroom wall don’t mean the prevention routine failed, only that a film built up somewhere before the schedule caught it. Run the cup test from the removal guide to find which drain is active, then go back to scrubbing rather than reaching for an aerosol: a spray clears the room for an afternoon and does nothing to the next generation already growing in the pipe. An apple cider vinegar trap works on fruit flies, not this one, so don’t expect it to help here. If you’re not sure which small fly you actually have, this comparison sorts out the three look-alikes, and if what’s hovering is over a houseplant instead of sitting still on a wall, a different prevention routine applies. For the wider seasonal habits, see the prevention hub and the home bug prevention checklist.
FAQ
Does bleach keep drain flies from coming back?
No. Ohio State Extension says bleach does not get rid of the scum that feeds drain fly larvae, and the larvae are resistant to it. UC IPM calls this a common misconception. A stiff brush or an enzyme-action cleaner removes the film; bleach mostly rinses past it.
Can drain flies come from somewhere other than a drain?
Yes. Ohio State lists standing water in houseplant saucers, humidifier trays, under air conditioners, in bird baths, and in pooled areas of wet mulch as breeding sites with no drain involved at all. Any surface that stays wet long enough grows the same film.
How often should I clean my drains to prevent them?
A weekly flush of running water in every drain, plus a monthly scrub with a brush or enzyme cleaner, matches the 8 to 24 day life cycle UC IPM gives for this insect. Waiting months between cleanings gives a film several generations to rebuild.
Is an enzyme drain cleaner the same as a caustic one?
No, and the difference matters. An enzyme-action product breaks down the bond between bacteria, algae and the pipe over time. A caustic, lye-based cleaner works differently and should never be used right after bleach: Ohio State warns the combination can release chlorine gas.
Are drain flies harmful to have in the house?
They don’t bite and aren’t a documented disease vector in homes, though UC IPM notes they could carry pathogens up out of the drain they breed in, and that fragments of dead adults can become airborne allergens. Mostly they’re a sign that a film has been building somewhere unnoticed.
Sources
- Ohio State University Extension, College of Food, Agricultural, and Environmental Sciences, Drain Flies (Moth Flies), Fact Sheet ENT-41, originally by William F. Lyon, revised by David Shetlar.
- University of California Statewide IPM Program, Pest Notes: Moth or Drain Flies, UC ANR Publication 74167.
- University of Kentucky Entomology, Drain Flies or Moth Flies, ENTFACT-615.