How to Get Rid of Drain Flies for Good (Step-by-Step)

As an Amazon Associate I earn from qualifying purchases. Our picks are based on specs, expert guidance and verified owner reviews. Learn more.

How to Get Rid of Drain Flies for Good (Step-by-Step)

Quick answer: To get rid of drain flies, you have to remove the slimy film (biofilm) inside the drain where their larvae live. Find the drain they’re coming from with a tape test, scrub it out with a stiff drain brush, then treat it nightly for about a week with an enzyme drain gel. Trap the adults while you work. Pouring bleach or boiling water alone rarely ends the problem.

If you’re trying to figure out how to get rid of drain flies, you’ve probably spotted small, fuzzy gray flies resting on the bathroom wall or hopping around the sink. They’re also called moth flies or sink flies, and they’re one of the most common “gnats” in homes.

They don’t bite and they’re not a sign of a dirty house, but they multiply quickly. The fix is simple once you understand where they breed. This guide is based on guidance from university extension entomologists and plumbing basics you can do yourself.

What are drain flies?

Drain flies are tiny, about one-sixteenth to one-eighth of an inch long, with fuzzy bodies and wings that look like a moth’s. When resting, they hold their wings flat over the body like a little roof or heart shape. They fly weakly, in short hops, and often sit still on walls, tubs and shower curtains.

They’re easy to confuse with fruit flies and fungus gnats. Fruit flies are tan with red eyes and hang around produce; fungus gnats are black, long-legged and stay near houseplants. Our guide on how to get rid of gnats in the house compares all three side by side.

What causes drain flies?

Drain flies lay their eggs in the gelatinous film of hair, soap scum, grease and bacteria that builds up inside pipes. The larvae live and feed in that film, then emerge as adults. Under warm indoor conditions, the whole cycle can take as little as one to three weeks, so a single slimy drain can keep producing flies for months.

Common breeding spots:

  • Bathroom sink and tub drains, especially the overflow opening under the rim
  • Shower drains with hair buildup
  • Kitchen sinks and garbage disposals
  • Floor drains in basements, laundry rooms and garages
  • Drains in rarely used guest bathrooms, where the P-trap can dry out
  • Less obvious spots: the dishwasher air gap, the drip pan under the fridge, AC condensate lines, sump pits and plant saucers with standing water

If flies keep appearing near a floor or wall with no drain nearby, a cracked sewer pipe under the slab or behind a wall can be the source. That’s a job for a plumber.

How to find which drain they’re coming from

Before you clean anything, confirm the source. The tape test is quick and reliable:

  1. Pick a drain where you see flies and let it sit unused overnight.
  2. Cover it loosely with clear packing tape, sticky side down, leaving a small gap on one edge so air can pass. Or set a clear plastic cup upside down over the drain.
  3. Check the next morning. Flies stuck to the tape or trapped in the cup mean that drain is breeding them.
  4. Repeat on each drain for a few nights. It’s common to have more than one source.

How to get rid of drain flies: step by step

  1. Remove the stopper and clear hair. Pull out the sink or tub stopper and clean the gunk off it. Use a plastic drain snake to pull hair from the first few inches of the pipe.
  2. Scrub the biofilm. This is the step that matters most. Push a long, stiff pipe brush down the drain and scrub the walls of the pipe, then scrub the overflow opening in sinks and tubs. Run warm water while you work. Scrubbing physically removes the film where eggs and larvae live.
  3. Flush with hot water. Pour a kettle of hot water down the drain to rinse loosened slime. Hot water alone doesn’t dissolve biofilm, and very hot or boiling water can soften older PVC joints and crack porcelain, so use water just off the boil and pour it slowly.
  4. Treat the drain nightly for about a week. Before bed, pour an enzyme or bio-based drain gel down the drain and leave it overnight so it can cling to the pipe walls and break down what’s left. Follow the label, and repeat for five to seven nights, since larvae can survive a single treatment.
  5. Trap the adults. Put a plug-in light trap or a strip of tape near the drain to catch adult flies while you clean. Killing adults stops new eggs, but they’ll keep appearing for a few days as the last larvae hatch.
  6. Check the P-traps and unused drains. Run water in every guest sink, tub and floor drain for 30 seconds. A dry P-trap lets sewer gas and flies come up from the line. For floor drains that rarely see water, pour in a quart of water every couple of weeks.
  7. Look at the hidden spots. Clean the garbage disposal (ice and a brush work well), the dishwasher filter and air gap, the fridge drip pan and any AC condensate line that drips into a floor drain.
  8. Test again. After a week, repeat the tape test. No flies on the tape for several nights means you’ve found and cleared the source.

Does bleach kill drain flies?

Not reliably. Bleach runs straight through the pipe and doesn’t cling to or break up the biofilm, so larvae in the film usually survive. It also isn’t great for septic systems. Harsh chemical drain openers are made for clogs, not flies, and don’t replace scrubbing.

Baking soda and vinegar can loosen some buildup and help as a cleaning step, but the fizz doesn’t reach far into the pipe. Treat it as a bonus, not a cure. The combination that works is mechanical scrubbing plus several days of an enzyme treatment.

Never mix drain products. Combining bleach with ammonia, vinegar, acids or chemical drain openers can release toxic gases. If you’ve already poured a chemical drain cleaner, flush with plenty of water and wait before using anything else. Wear gloves and eye protection, ventilate the bathroom, and keep kids and pets away. Follow every product label exactly.

The equipment that helps

A stiff drain brush and a plastic hair snake from the hardware store do the heavy lifting. These products cover the treatment and trapping. For more trap options, see our guide to the best fruit fly trap for kitchens and bathrooms.

Best drain treatment

Enzyme Drain Gel Treatment (32 oz)

Best for: sinks, tubs and floor drains that keep producing drain flies.

Why we picked it

  • Gel coats pipe walls and breaks down the biofilm where larvae live
  • Non-toxic enzyme formula instead of harsh drain chemicals
  • Also helps with fruit flies and gnats breeding in drains

Keep in mind

  • Needs several nights in a row plus scrubbing for best results
  • Won’t fix a dry P-trap or broken pipe

Check price on Amazon

Best trap for adults

Zevo Plug-In Flying Insect Trap (1 Base + 3 Refills)

Best for: catching adult drain flies in bathrooms and kitchens while you treat the drain.

Why we picked it

  • Blue and UV light draws in drain flies, fungus gnats and fruit flies
  • Glue cartridge is hidden, no sprays or odors
  • Runs all night, when drain flies are active

Keep in mind

  • Needs an outlet near the drain
  • Catches adults only; it won’t stop larvae in the pipe

Check price on Amazon

If fruit flies are mixed in

TERRO Fruit Fly Trap (4-Pack)

Best for: kitchens where you have both drain flies and fruit flies around the sink and trash.

Why we picked it

  • Food-based lure targets fruit flies, which also breed in kitchen drains
  • No outlet needed; sits next to the sink
  • Pack covers several spots

Keep in mind

  • Drain flies aren’t strongly drawn to fruit lures
  • Owner ratings are mixed; placement next to the source matters

Check price on Amazon

How to keep drain flies from coming back

  • Brush your drains monthly. A quick scrub with a pipe brush keeps biofilm from building up.
  • Use a drain screen in showers and tubs to catch hair before it enters the pipe.
  • Run water in unused drains every week or two so P-traps stay full.
  • Clean the sink overflow when you clean the bathroom. It’s the most overlooked breeding spot.
  • Fix slow drains and leaks promptly. Standing water and damp areas feed biofilm.
  • Keep humidity in check in basements and bathrooms with an exhaust fan or dehumidifier. Our guide on how to reduce humidity in the house has targets and tips.

When to call a professional

Call a licensed plumber if flies keep coming back after two weeks of scrubbing and treating every drain, if you see flies coming from cracks in the floor, walls or around the base of the toilet, if you notice a sewer smell or soggy spots, or if a floor drain gurgles or backs up. These can point to a broken drain line, a failed toilet seal or a problem with the sewer line, which a plumber can find with a camera inspection. If flies are coming from a commercial kitchen or apartment building, involve the landlord or property manager.

Frequently asked questions

How long does it take to get rid of drain flies?

If you scrub the drain and treat it nightly, most people see far fewer flies within three to five days and clear the problem in one to two weeks. Adults live about two weeks and larvae already in the pipe may still emerge for a few days, so keep trapping and treating for a full week. If flies are still there after two weeks, look for a second source or a broken pipe.

Will boiling water get rid of drain flies?

Boiling water can kill some larvae it touches and rinse away loose slime, but it doesn’t remove the biofilm stuck to the pipe walls, so flies usually return. It can also damage older PVC joints and porcelain. Use hot water as a rinse after scrubbing, and rely on a brush plus an enzyme drain gel for the real fix.

Are drain flies harmful?

Drain flies don’t bite or sting and aren’t known to spread disease to people in normal home settings. They’re mainly a nuisance. Large numbers, though, can signal a drain or sewer problem, and their dead bodies and fine scales can be an irritant for some people with allergies. If you have symptoms, talk to your doctor.

Why do I have drain flies but my drains are clean?

Drains that look clean at the top can still have thick biofilm deeper in the pipe or in the sink overflow. Other hidden sources include a dry P-trap in a guest bathroom, a floor drain, the fridge drip pan, the dishwasher air gap and a cracked sewer line under the floor. Use the tape test on every drain to find the real source.

What’s the difference between drain flies and fruit flies?

Drain flies are fuzzy and gray with moth-like wings and tend to sit on bathroom walls. Fruit flies are tan with red eyes and hover around ripe produce and trash. Drain flies breed in pipe slime; fruit flies breed in fermenting food, though they also use drains. Our guide on how to get rid of fruit flies covers the kitchen side.

Next step: if the tiny flies are around your produce instead, follow our guide on how to get rid of fruit flies, or read how to get rid of fungus gnats if they’re hovering over your houseplants. For other household pests, start with our guide on how to get rid of mice.