Skip to content
The Pest Guide logo: an orange ant behind a magnifying glass The PestGuide
Question · answered · Flies & Gnats

Why are there drain flies in the bathroom?

Updated · The Pest Guide · Editorial policy

Illustration of the drain flies
Drain flies Family Psychodidae
Short answer

Drain flies are in the bathroom because a slimy film of soap residue, hair, and bacteria has built up inside the drain pipes. Female drain flies lay eggs directly in this organic film, and the larvae live submerged in the slime until they hatch into adults within two to three weeks.

What is actually going on

You walk into the bathroom in the morning, flick on the light, and there they are again: two or three tiny fuzzy flies sitting on the wall above the sink, looking like miniature moths that have given up on life. You swat them. Two days later, more appear. So what is going on? Those flies are not coming in through a window, and they are not lost. They are being born inside your drain.

The short answer is unglamorous. Inside your drain pipes, especially the stretch just below the opening and the curved section called the P-trap, a layer of gunk builds up over time. It is a slimy film made of soap residue, hair, skin cells and the bacteria and fungi that feed on all of it. To you it is dirt. To a drain fly it is a nursery with catering included. The female lands on that film, lays a cluster of eggs, and the larvae hatch straight into their food supply. They even have a little breathing tube that lets them live submerged in the slime without drowning, which is a neat trick and also the reason they are so hard to wash away. A couple of weeks later, new adults crawl up out of the drain and perch on your mirror.

This is why the problem keeps coming back no matter how many adults you kill. The flies on the wall are the tip of the operation. The real population lives a few inches below the drain opening, and it renews itself on a cycle measured in days. In a warm bathroom, eggs can hatch within 48 hours, and the whole trip from egg to flying adult takes roughly two to three weeks. So if you are seeing a steady trickle of flies, the drain has been quietly producing them for a while.

One thing worth clearing up right away, because people always ask: these flies do not bite. They physically cannot. Their mouthparts are built for sponging up liquids, not piercing skin. They are a nuisance and a hygiene concern, since they spend their childhood in sewage-adjacent sludge and then walk on your surfaces, but they are not going to bite you in the shower. If something in your bathroom is biting you, that is a different insect and a different conversation.

How to tell for sure

Before you declare war on the drain, make sure the drain is actually the culprit, because several small flies get blamed for each other's crimes. Drain flies are the fuzzy ones. Look closely at one resting on the wall: it has a hairy body and broad wings held over its back like a little tent or a folded umbrella, giving it the silhouette of a tiny moth. It is usually somewhere between a sixteenth and a fifth of an inch long. When it does fly, it is a weak, clumsy flier that hops a short distance and lands again. If you squash one, it can leave a powdery smudge, which is just the dust of hairs from its wings.

Now watch how it moves when you approach, because this is the genuinely useful test. If the fly takes off in that bumbling, moth-like flutter, think drain fly. If instead it sprints across the sink in fast, jerky little zigzags before bothering to fly, you are probably looking at a phorid fly, sometimes called a scuttle fly for exactly that reason. Phorid flies have a humpbacked profile and no fuzz. This distinction matters because phorid flies often point to a bigger problem, like a cracked sewer line under the floor, rather than a dirty drain you can scrub yourself. And if the tiny flies are slender, long-legged, mosquito-looking things drifting toward the light of your mirror or window, those are usually fungus gnats, and their home is the soggy soil of that potted plant on the windowsill, not your plumbing.

The definitive test for a suspect drain is wonderfully low-tech. Take a strip of clear packing tape and stick it across the drain opening, sticky side down, but do not seal the whole opening. Leave gaps at the sides so air still flows and the flies can still come up. Leave it overnight. If you find small flies stuck to the underside in the morning, congratulations: you have found the maternity ward. If the tape comes up clean after a night or two, that drain is innocent, and you should test the shower, the tub, a floor drain or the overflow channel next. In bathrooms that see heavy use, the slime also builds up in places people forget, like the track of a sliding shower door or the little overflow hole in the sink basin.

One more scenario fools people constantly: the guest bathroom or basement shower that nobody uses for a month or two. The P-trap under a drain works because a plug of water sits in the curve and blocks the pipe. Let the fixture sit idle long enough and that water evaporates, leaving an open corridor between your bathroom and the sewer line. If you open a long-closed bathroom and find a welcoming committee of flies, run the water for half a minute before assuming anything worse. An evaporated trap is the most boring possible explanation, and boring is good news.

What usually comes next

So here is the decision in front of you, and it is refreshingly simple: the film has to come off the pipe wall, physically, because nothing else actually works. This is the part where I get to ruin the internet's favorite home remedy. Pouring bleach down the drain feels decisive. It smells like you accomplished something. But it mostly glides over the top of the slime without stripping it off the pipe, the way water sheets off a raincoat, and the larvae underneath barely register the event. Boiling water has the same flaw, plus it cools the moment it touches the pipe. Chemical drain openers are built to dissolve clogs, not to scour a living film off the walls, and they bring their own hazards along for the ride.

What actually works is elbow grease. Take off the drain cover, grab a stiff-bristled brush, ideally a long pipe brush, and scrub the inside of the pipe as far down as you can reach. You will pull up gray-black slime. It is unpleasant, and it is also the entire point. Flush with hot water afterward. Then, for the stretch your brush cannot reach, follow up with a microbial or enzymatic drain cleaner. These products use bacteria or enzymes that digest the organic film over several nights of application, which is a slow but thorough way to finish the job. One caveat before you buy: if your home runs on a septic system, check that the product says it is septic-safe.

And here is what not to do, because someone always suggests it: do not pour insecticide down the drain. Household sprays are not labeled for that use, they will not reach the larvae reliably anyway, and you would be sending chemicals straight into the water system for no benefit. There are insect growth regulator products specifically labeled for drain application, but the label is the law there. Honestly, if the scrubbing and the enzyme cleaner are done properly, you usually will not need anything else.

Now give the process a fair window before you declare victory or defeat. Adults already in the pipeline will keep emerging for a week or two after you clean, so judging the results on day three will only discourage you. If you cleaned thoroughly and the flies fade away, you had your answer all along: a dirty drain, now a clean one. After that, keep an occasional eye on rarely used drains and run water in them now and then, and you will likely never think about any of this again.

When to get help

There is a point where persistence stops being a cleaning issue and starts being a plumbing issue. Say you have scrubbed every drain, run the tape test on all of them, followed up with an enzymatic cleaner, and flies are still showing up three weeks later. At that point the breeding site is probably somewhere your brush cannot go. The classic scenario is a cracked or broken sewer pipe under a concrete slab. Sewage leaks into the soil, flies breed in it by the thousands, and the adults work their way up through floor cracks and gaps around pipes. This is especially worth suspecting in ground-floor or basement bathrooms, and doubly so if your flies are the jerky-running phorid kind. Finding and fixing that is a job for a licensed plumber, and if the pest side of it needs treatment, that belongs to a licensed applicator.

On the health side, the bar for concern is low but real. A handful of drain flies is a nuisance, nothing more. A heavy, long-running infestation is a different matter, because dead flies break down into fine particles and shed hairs that can irritate airways and aggravate asthma or allergies in sensitive people. If someone in the house is having respiratory symptoms that seem tied to the problem, that is worth mentioning to a clinician, and it is one more reason not to let a stubborn infestation drag on for months. And if this is happening in a commercial kitchen, a care facility or anywhere with public health obligations, skip the DIY phase entirely and bring in a licensed pest management professional, because the compliance stakes there are a different animal.

For everyone else, it comes down to this: the flies are there because the drain is feeding them, the tape test will tell you which drain, and a brush plus some patience will usually end it. If it does not, the house is telling you something about its plumbing, and that is a message worth paying a professional to translate.

Next questions