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

How do you get rid of drain flies?

Updated · The Pest Guide · Editorial policy

Illustration of the drain flies
Drain flies Family Psychodidae
Short answer

To get rid of drain flies, you physically scrub the inside of the pipe with a stiff bristle brush and then treat it with a bio-enzymatic drain cleaner. Bleach and boiling water fail because they leave the slimy organic film untouched, but the brush and enzymes eliminate the nursery where the insects breed.

What is actually going on

You lean over the bathroom sink to brush your teeth and there it is again, a tiny fuzzy fly parked on the tile like it pays rent. You swat it. Tomorrow there are two more. You have already poured half a bottle of bleach down that drain, and the little squatters could not care less.

Here is the short answer. To get rid of drain flies, you physically scrub the inside of the pipe with a stiff bristle brush, then treat it with a bio-enzymatic drain cleaner that digests the gunk they breed in. That is the whole game. Everything else, the bleach, the boiling water, the caustic drain opener, is theater.

The reason those popular fixes fail is simple once you know what is happening down there. Drain flies do not breed in water. They breed in the slimy film of organic gunk that coats the inside walls of pipes, traps and garbage disposals. Think of the slippery dark layer on a river rock. You can splash water over that rock all day and the slime stays put. Bleach and boiling water behave the same way in your pipe: they glide right over the film, maybe rinse off the loose top layer, and leave the nursery underneath untouched. The eggs hatch in a couple of days, the larvae tunnel into that slime and feed on it, and a few weeks later a fresh batch of adults hops onto your bathroom wall.

The flies themselves are harmless in the biting department, by the way. They do not sting and they do not come after you. They are weak, clumsy fliers that mostly sit on walls near their home drain. But while they are alive they are a rolling sanitation problem, since they emerge from sewage-adjacent grime and then land on your counters and toothbrushes. So yes, it is worth doing this properly, and properly means brush plus enzyme cleaner, repeated over several days.

How to tell for sure

Before you scrub anything, make sure you are fighting the right fly and the right drain. This matters more than people think, because several small flies get lumped together as gnats and each one has a different home base. Treat the wrong source and you can scrub your sink raw while the real nursery keeps producing.

Drain flies are easy to recognize once you have looked closely. They are tiny, around an eighth of an inch, dark gray or brown, and noticeably fuzzy, like a moth that got shrunk in the wash. Their wings are broad and held flat or tent-like over the body when they rest. When they move, they do it in short, hopping flights of a few feet, not long confident loops around the room. If you squash one, it leaves a powdery smudge from all those tiny hairs.

Compare that with the usual impostors. Fruit flies are smoother, tan-colored, often with red eyes, and they hang around the fruit bowl or the recycling bin. Fungus gnats are slender and mosquito-like, and they come from overwatered houseplant soil, not plumbing. Phorid flies have a humped back and a strange habit of sprinting across the counter in jerky little runs instead of flying. If your supposed drain flies are hovering around the TV at night, check the peace lily before you blame the sink.

To confirm which drain is the culprit, use the tape test. Dry the rim of the drain, then lay a strip of clear packing tape across the opening, sticky side down. The important part: cover only part of the opening, leaving a good portion uncovered so air can still flow up out of the pipe. Seal it completely and the flies cannot rise, and you will get a false all-clear. Leave the tape overnight and check it in the morning. Flies stuck to the underside mean that pipe is an active breeding site. Test every suspect: the bathroom sink, the shower, the floor drain, the kitchen disposal, even the washing machine standpipe. In a bigger house this can take a couple of nights, which is fine. A patient evening with packing tape beats a week of scrubbing the wrong pipe.

What usually comes next

So the tape pointed a finger and now you know which drain is guilty. Good. The fix from here is a two-step routine, not a product you buy and forget about.

First comes the mechanical part, and yes, it is a little gross. Pull off the drain cover or stopper and work a long, stiff-bristled pipe brush down into the drain and the trap, scrubbing the walls with a twisting, up-and-down motion. You are trying to physically tear that gelatinous film off the pipe wall, so put some shoulder into it. Then flush with plenty of hot water to carry the loosened sludge away. Hot water by itself does nothing, as we established, but hot water after a proper scrubbing is exactly the right move.

Second comes the biological part. Apply a bio-enzymatic drain cleaner, the kind sold as drain gel or microbial drain treatment, following the label. These products are full of bacteria and enzymes that digest the remaining organic film down at a level no brush can reach. Pour it in at night, when the drain will sit unused for hours, so it gets maximum contact time, and repeat daily for about a week. One application rarely finishes the job, because that film builds up in layers and the stuff needs time to eat through them. If your house runs on a septic system, check the label for septic-safe wording, though these products are generally designed to be gentle on plumbing and septic tanks alike.

At this point a reasonable person asks: why not just kill the adults and call it done? Fair question. You can swat them, or use a household flying-insect spray labeled for indoor use if you want quicker relief, and it will make the bathroom feel calmer. Just know it is cosmetic. Killing adults without removing the breeding film is like mowing weeds and leaving the roots: the yard looks tidy for about four days. And resist the urge to pour pesticides down the drain. Most liquid insecticides are not labeled for use inside plumbing, and the label is the law.

One more thing worth doing while you are in cleaning mode. Scrub under the garbage disposal splash guard, empty the fridge drip pan, and check any drain that rarely gets used. A guest bathroom sink that runs twice a year is a classic hidden nursery, because the film sits there undisturbed for months, quietly raising a family.

When to get help

Say you have scrubbed, run the enzyme treatment for a week or more, and flies are still emerging in force. At that point, stop buying products. That pattern usually means the breeding site is not inside the pipe at all. A cracked or broken sewer line under a concrete slab or in a crawl space can leak sewage into the soil, and flies will happily breed in that saturated ground and wander in through slab cracks and expansion joints. No amount of drain gel reaches that. This is a job for a licensed plumber, typically starting with a camera inspection of the line, and possibly a pest control professional working alongside.

The same logic covers commercial kitchens, where flies breed under floor mats, in trough drains and under loose tiles, and any healthcare or care facility setting, where small flies around patients are a genuine hygiene concern. Those situations call for a licensed pest control operator, full stop.

On the health side, drain flies do not bite, but in heavy infestations the dust from their disintegrating bodies can become airborne and aggravate allergies or asthma in sensitive people. If someone in the house is having respiratory symptoms you suspect are connected, that is a conversation for a clinician, not a hardware store.

For everyone else, the path is refreshingly low-tech: find the right drain with tape, scrub the slime out, let the enzymes finish the job, and keep the drain clean enough that the film never rebuilds. Do that, and the fuzzy little tenants get their eviction notice for good.

Next questions