Your guide to household and yard pests Urgent? When to call a pro
What bug is this?

How to Get Rid of Drain Flies

To get rid of drain flies, scrub the slime out of the drain they breed in. Find the right drain with the tape test, clean it, and repeat weekly for three weeks.

harmlessdoes not biteleaves once you fix the cause updated October 22, 2026
Drain fly, a fuzzy gray moth fly with roof-shaped wings, on bathroom tile next to a shower drain
What they are
moth flies (Psychodidae), fuzzy gray flies 1/16–1/5 inch long
Where they breed
slime (biofilm) inside sink drains, tub overflows, shower drains, floor drains, leaks
What kills them
scrubbing the biofilm out, then an enzyme or bio drain cleaner
What fails
boiling water, bleach, baking soda and vinegar, fly spray, foggers
Life cycle
egg to adult in 8–24 days; adults live about 2 weeks
How long it takes
3–4 weeks of weekly cleaning to break the cycle

To get rid of drain flies, you have to remove the slimy film inside the drain where their larvae live: find the drain they come from, scrub it out with a pipe brush, then use an enzyme drain cleaner. Repeat weekly for three to four weeks, because killing the adults on the wall does nothing while the breeding site is still there.

Make sure they are drain flies

Drain flies (also called moth flies or sewer gnats, family Psychodidae) are true flies that look like tiny moths:

  • 1/16 to 1/5 inch long (2–5 mm), gray or tan, with the body and wings covered in fuzzy hairs.
  • Wings held like a roof over the body when resting, giving a small triangle or heart shape.
  • Weak, jerky fliers. They hop a few inches and land again, usually on the wall by the sink, tub or toilet.
  • Active at night and most noticeable in bathrooms, basements and laundry rooms.

If the flies are tan with red eyes and hang around the fruit bowl, they are fruit flies. If they are slender and black and rise from houseplant soil, they are fungus gnats. Our gnats vs fruit flies guide covers all three side by side.

Step 1: find the exact drain (the tape test)

Clear tape stuck over a bathroom sink drain with tiny gray flies caught on it
Tape over each drain overnight shows exactly which opening the flies come from.

Don't clean everything blindly. Find the source first:

  1. At night, put a strip of clear tape over each drain opening, sticky side down: sinks, tub, tub overflow, shower, floor drain. Leave a small gap for air.
  2. In the morning, look at the sticky side. Flies that emerged overnight will be stuck over the drain they came from.
  3. Repeat for 2–3 nights to see if there is more than one source.
  4. No flies on any tape but still seeing them? Look beyond the drains (see below).

Alabama Extension and UF/IFAS both recommend this method because it beats guessing from where adults happen to rest. Drain flies fly poorly, so the nearest drain is usually the source, but not always. Two extra spots worth taping: the tub overflow plate and the seam where the toilet meets the floor (a failed wax seal lets flies breed under the toilet).

Step 2: scrub out the biofilm

Females lay eggs in masses of roughly 15 to 100 in the gelatinous film on pipe walls, a mix of bacteria, soap scum, hair and skin oils. Per Alabama Extension, eggs hatch in about 2 days, larvae feed for 8 to 15 days, pupae take 1 to 2 days, and the whole cycle runs 8 to 24 days depending on temperature. Larvae (thin, legless, grayish, up to about 3/8 inch) breathe through a short tube at the tail, which is why a quick flush of liquid doesn't drown them. Adults emerge ready to mate within hours. Remove the film and you remove the population.

Gloved hands scrubbing a removed sink trap with a narrow brush over a basin
The dark slime on the trap walls is the breeding site. It has to be scrubbed off, not flushed.
  1. Pull the P-trap under the sink if it comes off by hand (put a bucket underneath). Scrub the inside of the trap and the pipe with a narrow brush.
  2. If the trap won't come off, run a stiff, flexible drain brush down the drain as far as it will go and work it back and forth.
  3. Clean the tub overflow. The hole under the faucet is the most overlooked source. Unscrew the cover plate and brush inside.
  4. Shower and floor drains: lift the grate, scrub the grate and the walls below it.
  5. Don't forget the pieces: pop-up stopper, pivot rod, shower strainer and the underside of a garbage disposal's rubber splash guard collect the same slime. Clean them before reinstalling.
  6. Finish with an enzyme or bacterial drain cleaner (gel or foam types cling to the pipe walls better than liquid). Use it at night when the drain won't be used for several hours. Texas A&M notes these products need repeat applications over several weeks; they work best after mechanical cleaning, not instead of it.
  7. Repeat weekly for 3–4 weeks. The cycle is 8 to 24 days, so this catches anything that hatches from surviving eggs.

Kill the adults you can see with a fly swatter, a vacuum, or a basic flying-insect spray. That is cosmetic: it makes the room bearable while the cleaning works. A small sticky trap or a UV light trap near the sink is useful as a counter: if the daily catch keeps falling, the plan is working.

Drain fly killer products, compared

Product typeExamples of activesWhat it doesVerdict
Pipe brush / drain snakenonephysically removes the biofilmessential, the core of the fix
Enzyme or bacterial gel/foammicrobes, enzymesdigests remaining film over weeksgood follow-up, needs repeat use
Foam with insect growth regulatormicrobes plus an IGR (e.g. hydroprene)stops larvae from becoming adultspro-grade option for stubborn or hard-to-reach drains; follow the label
Flying-insect spray, sticky trapspyrethrinskills adults onlycosmetic relief
Bleach, boiling water, baking soda + vinegarn/aflows past the filmdoesn't solve it
Foggers / bug bombspyrethroidskills some exposed adultsnot worth it

How dangerous are these products

The real fix for drain flies (a brush and an enzyme cleaner) is close to harmless. The risks come from the extras: spray in a small bathroom with no ventilation, bleach mixed with other cleaners, and foggers that coat every surface.

Comparison table

Enzyme / bacterial drain gel or foamActive ingredient: microbes, enzymes
CatsSafe
DogsSafe
Kids, pregnancy, allergiesSafe
keep the bottle out of reach; irritating if swallowed
Fish, birds, rodents, reptilesSafe
Bio foam with IGRActive ingredient: microbes + hydroprene (check the label)
CatsSafe
low toxicity; keep pets away until it settles
DogsSafe
Kids, pregnancy, allergiesCaution
keep kids out while applying
Fish, birds, rodents, reptilesCaution
don't use near the aquarium
Flying-insect sprayActive ingredient: pyrethrins, often with piperonyl butoxide
CatsKeep out
keep out until aired; cats lick it off paws and fur
DogsCaution
keep away while spraying
Kids, pregnancy, allergiesKeep out
out while spraying and airing; triggers asthma
Fish, birds, rodents, reptilesDanger
extremely toxic to fish; birds out of the room
Sticky and UV trapsActive ingredient: none
CatsCaution
keep sticky cards where pets can't reach
DogsCaution
Kids, pregnancy, allergiesSafe
Fish, birds, rodents, reptilesCaution
small animals can get stuck
BleachActive ingredient: sodium hypochlorite
CatsKeep out
fumes; keep away until rinsed and aired
DogsKeep out
same
Kids, pregnancy, allergiesKeep out
never mix with ammonia or acid cleaners: toxic gas
Fish, birds, rodents, reptilesDanger
birds are very sensitive to fumes
FoggersActive ingredient: pyrethroids + flammable propellant
CatsDanger
coats everything
DogsKeep out
evacuate
Kids, pregnancy, allergiesDanger
everyone out for the label time; fire risk
Fish, birds, rodents, reptilesDanger
deadly to fish and birds
Safesafe to stayCautionkeep away during applicationKeep outkeep out until dry and aired outDangerserious danger, don't use around them

Sprays and foggers. Pyrethrins are less toxic to cats than permethrin, but in a small bathroom the mist settles on the floor and litter box. Close the door, keep pets and kids out until aired, and never spray toward an aquarium. Bleach combined with ammonia or acidic drain products releases toxic gas: if you feel burning in the eyes, nose or chest, leave and get fresh air.

If something goes wrong: wash skin with soap and water; rinse eyes for 15 minutes; if someone swallowed a product or has trouble breathing after fumes, call Poison Control at 1-800-222-1222. For a pet that's drooling, trembling or vomiting, call your vet or ASPCA Animal Poison Control at (888) 426-4435. See also pet-safe pest control.

What doesn't work, and why

  • Boiling water. It cools within seconds in the pipe and doesn't penetrate the slime. It can also crack PVC fittings and porcelain.
  • Bleach. Flows straight past the biofilm. Larvae have water-repellent hairs and a breathing tube that lets them ride out a brief flush.
  • Baking soda and vinegar. The fizz looks impressive but doesn't remove a film that's been building for months.
  • Bug bombs and foggers. They kill some adults, leave residue on every surface, and never reach the larvae.
  • Fly spray down the drain. Alabama Extension is blunt: never pour insecticides down drains. They aren't labeled for it and don't reach larvae inside the film.
  • Mixing cleaners. Never combine bleach with ammonia or acidic cleaners in a drain; the fumes are dangerous.

The Utah State and Alabama extension services both list these methods as ineffective on their own, and Alabama adds that some can damage pipes. People who say "I've poured bleach down every day for a month" are almost always describing a drain that was never brushed.

Drain flies in the bathroom: the usual hiding spots

  • Sink trap and the horizontal pipe behind it
  • Tub overflow (very common)
  • Shower drain below the strainer
  • Toilet: a failed wax ring lets water and sewage seep under the base, creating a hidden breeding spot
  • Rarely used guest bath sink or shower, where the water seal dries out

Run water in unused drains once a week so the trap stays full.

If the drains are clean and they still show up

Drain flies need wet organic matter, not necessarily a drain. Check for:

  • Leaks under the kitchen sink, behind the dishwasher, or under a shower pan.
  • Floor drains and sump pits in basements and garages.
  • A cracked sewer line under the slab. If flies appear near a floor crack or baseboard with no drain around, this is a plumber's job. A camera inspection costs roughly $150–$400 (approximate, varies by region).
  • Air conditioner condensate pans and drip lines.
  • Outside sources like clogged gutters or a wet compost pile next to a window.

What people who dealt with it say

Threads on r/pestcontrol, r/HomeImprovement and r/Plumbing about drain flies follow a predictable arc, and the patterns are useful:

  • Almost everyone starts with boiling water, bleach or vinegar, and almost everyone reports it did nothing. The posts that end with "they're gone" mention a brush, pulling the trap, or weeks of a foaming bio product.
  • The source is often a drain nobody uses. Pest pros repeatedly point to basement floor drains next to the washer, guest showers whose traps have dried out, and tub overflows. One technician described a customer whose entire infestation came from a basement floor drain he had never looked into.
  • Things get worse before they get better. One homeowner foamed the basement shower and sink with a bio product before a week's vacation and came back to a tape full of flies; pros replied that years of built-up film take repeated treatments every couple of weeks to break down, and that scrubbing the pipe speeds it up.
  • Exterminator sprays rarely help. Several people paid for repeated spray visits that "just killed the adults." A pest pro with 11 years in the trade said he never uses insecticides for drain flies; he has customers treat every drain with an enzyme cleaner daily until the flies stop.
  • When flies come out of a wall, a floor crack or an access panel, it's plumbing. The hardest cases on Reddit ended with a camera inspection, a moisture test or a small hole in the drywall that revealed a leaking pipe or a broken sewer line under the slab. Homeowners with 100+ flies a day from a slab bathroom were told pest control can't fix that.
  • Check the non-drain gunk too: forgotten cereal bowls in a kid's room, a refrigerator drip pan, a dishwasher filter or wet sponges can breed the same small flies.

Typical timeline in these threads: a light problem fades in 2–3 weeks of brushing plus enzyme treatment; a long-ignored drain takes a month or more; a sewer-line problem doesn't end until the pipe is fixed.

When to call a pro

Call a plumber when the tape test points to a floor drain or an area with no visible plumbing, or when flies keep coming after a month of weekly cleaning. Pest control companies can treat drains with foaming biological products and insect growth regulators, but they can't fix a broken pipe; repeated spraying for adults is a sign the source hasn't been found. Expect a one-time drain fly service around $150–$300 (approximate).

Keeping them from coming back

  • Brush and enzyme-treat busy drains once a month.
  • Clean the tub overflow when you clean the tub.
  • Fix drips and leaks promptly.
  • Keep traps in rarely used drains filled with water (run them weekly).
  • Clean the garbage disposal splash guard and dishwasher filter monthly.
  • Keep the refrigerator and AC condensate pans clean and dry; a dehumidifier helps in damp basements.

Drain flies don't bite and aren't a sign of a dirty home. They're a sign of a dirty pipe, and that is a fixable problem.

FAQ

What kills drain flies?
Removing the slime layer they breed in. Scrub the drain, trap and overflow with a stiff pipe brush, then treat with an enzyme or bacterial drain cleaner, repeated over several weeks. A fly spray or flypaper kills the adults on the wall, but new ones keep hatching until the breeding site is cleaned.
Does boiling water or bleach get rid of drain flies?
Not on their own. Alabama Extension lists bleach, vinegar, baking soda and boiling water as ineffective and potentially damaging to pipes, and Texas A&M notes bleach barely touches the biofilm. Hot water is only useful as a rinse after you have scrubbed the pipe with a brush.
How do I get rid of drain flies in the bathroom?
Tape over every drain overnight, including the tub overflow and the toilet base, to find the source. Then pull and clean the sink trap, brush the tub overflow and shower drain, and treat with an enzyme gel or foam. Repeat weekly for three to four weeks.
How do I get rid of fruit flies in the drain?
The method is the same: scrub the drain and the underside of the garbage disposal's rubber splash guard, then use an enzyme cleaner for a few weeks. Small flies breeding in kitchen drains are often dark-eyed fruit flies or phorid flies rather than drain flies, and they all live in the same gunk.
Are drain flies the same as fruit flies or gnats?
No. Drain flies are gray, fuzzy and moth-like with wings held roof-style; they sit on walls near drains. Fruit flies are tan with red eyes and hover around fruit and trash. Fungus gnats are slender and black and live in plant soil. See our comparison of all three.
Why do I still have drain flies after cleaning?
Either adults that hatched before cleaning are still living out their roughly two-week lifespan, or there is a second source: an overflow, a floor drain, a failed toilet wax ring, a broken pipe under the slab or a wet wall void. If you still catch flies on tape after a month of cleaning, call a plumber for a camera inspection.
Is it bad to have drain flies?
They don't bite and are mostly a nuisance, but large numbers point to a moisture or plumbing problem, and dead flies can break down into allergens. Persistent flies coming from a floor crack or wall are worth checking for a sewer leak.

Sources and real-world experience

Built from the expert sources and real discussions below — we read each one. How we research.

  1. Alabama Cooperative Extension: Drain Flies in the Home
  2. Utah State University Extension: Drain (Moth) Fly
  3. UF/IFAS: Drain fly, Psychoda spp.
  4. Washington State University Pest Sense: Moth flies (drain flies)
  5. Texas A&M AgriLife Extension: Indoor Flies and Their Control
  6. Reddit r/pestcontrol: I think it's safe to say I found the source of my drain flies
  7. Reddit r/pestcontrol: Unable to locate drain fly infestation source
  8. Reddit r/pestcontrol: Drain flies pretty much everywhere in the house, yet not many near drains
Nothing working? When it is time to call an exterminator