How to Get Rid of Drain Flies: 7 ways to flush out drain flies

Drain flies are the small, fuzzy-winged insects you find hovering near sinks, showers, and floor drains. They look like tiny moths, hold their wings flat over their bodies when resting, and are most active at night. They’re often confused with fruit flies or gnats, but drain flies are fuzzier, slower, and always tied to a drain rather than to food. They don’t bite, spread disease, or damage your home, but an unchecked population grows fast because each female lays 30 to 100 eggs at a time.

The root cause is always the same: a film of organic sludge coating the inside of a drainpipe. Hair, grease, soap residue, and food particles build up into a moist layer where larvae feed and develop. Fix the drain, and you fix the fly problem. Every time. Every method below targets that core issue.

1. Run a tape test to find infested drains

Before you treat anything, figure out which drains are the problem. Make an X shape with strips of clear packing tape over each suspect drain opening at night. Don’t cover the drain completely – you still need some airflow so the flies attempt to exit.

Leave the tape overnight. Drain flies are most active after dark, and any that try to emerge will stick to the adhesive. Check each drain the next morning. Test every drain in the house, including floor drains, laundry drains, and guest bathrooms you rarely use. Standing water in an unused P-trap is a common (and often overlooked) breeding site.

2. Clean the drain with a snake or brush

This is the most effective single step. Insert a drain snake or long pipe brush into the affected drain and use a steady up-and-down motion to scrape the slimy film off the pipe walls. Run warm water down the drain first to soften the buildup. What comes out will be disgusting. That’s how you know it’s working.

A plunger can help pull out stubborn material after you’ve loosened it. Chemical drain cleaners are tempting but less effective here – you need to physically remove the biofilm, not just dissolve the surface. The larvae live inside that film, and a liquid treatment won’t reach them all.

Using a drain brush to remove slimy buildup from inside a shower drain

3. Flush with baking soda and vinegar

After the mechanical cleaning, pour half a cup (120 ml) of baking soda down the drain, followed by half a cup (120 ml) of white vinegar. Let it fizz for 15 minutes. The reaction breaks down organic residue that the brush missed, especially in the first few inches of pipe where most larvae live.

Finish by flushing with boiling water. Do this weekly in kitchen and bathroom drains as ongoing maintenance. It’s cheap, safe for pipes, and takes less than five minutes.

4. Clean the P-trap

The P-trap (the U-shaped pipe section under your sink) holds standing water to block sewer gases. It also collects debris that becomes a hidden breeding ground. Place a large bowl under the trap, loosen the slip nuts on both sides with a cloth for grip, and remove the trap.

Pour out the standing water (it’ll smell awful), scrub the inside of the pipe, reassemble, and run water to refill the seal. Check the P-trap whenever drain flies persist after surface-level cleaning – the problem is often sitting right there.

5. Use an enzyme drain cleaner

Enzyme-based cleaners use biological agents to digest the organic residue that drain flies need. Pour the cleaner down the affected drain and let it sit for the time specified on the label – usually several hours or overnight.

Unlike chemical cleaners, enzyme formulas don’t damage pipes or septic systems. They also coat the pipe walls to slow future buildup. Use this after mechanical cleaning to catch whatever you missed. But one application usually isn’t enough for a heavy infestation. Repeat weekly until the flies stop appearing.

6. Set apple cider vinegar traps

While you are eliminating the breeding ground, trap the remaining adults. Pour about a quarter cup (60 ml) of apple cider vinegar into a small bowl or jar. Add a few drops of dish soap and stir gently. The vinegar attracts the flies, and the soap breaks the surface tension so they sink instead of landing and flying away.

Set several traps around affected areas, especially near drains where you have seen the most activity. Refresh daily. Don’t use white vinegar – the flies prefer the sweeter fermented scent of apple cider vinegar. This is the same trap that works for fruit flies in the kitchen and gnats indoors.

7. Install drain covers and strainers

Once the infestation is cleared, prevent the next one. Place mesh strainers over kitchen drains and hair catchers in shower and bathroom drains. These stop hair, food scraps, and other debris from entering the pipe and forming the buildup drain flies need.

Clean the strainers regularly so they keep working. Lowest effort of any step on this list. And the cheapest.

What causes drain flies

Drain flies appear when organic material accumulates inside pipes. The most common causes:

  • Slow or clogged drains. Partial blockages create the perfect breeding environment.
  • Grease, hair, and soap buildup. Kitchen sinks and bathroom drains are the usual culprits.
  • Unused drains. Guest bathrooms, floor drains, and laundry drains that sit dry allow the P-trap water to evaporate, giving flies a direct path from the sewer.
  • Leaking pipes. Any persistent moisture source near a drain or pipe joint attracts drain flies.

How to prevent drain flies from coming back

  • Clean drains with baking soda and vinegar on a weekly or biweekly schedule.
  • Use drain covers and hair catchers on all drains.
  • Fix leaks as soon as you notice them.
  • Run water through unused drains at least once a week to keep the P-trap full.
  • Wipe down sink and shower surfaces to reduce the organic film that seeps into pipes.

When to call a professional

Most drain fly infestations clear up within one to two weeks of consistent treatment. Call a plumber or pest control professional if:

  • The infestation persists after two or more weeks of daily treatment.
  • Flies are emerging from drains you cannot physically access, such as in-wall or under-slab pipes.
  • You suspect a broken or leaking sewer line.

A plumber can scope the line with a camera to identify damage or deep blockages that home methods cannot reach.

Frequently asked questions

How do I permanently get rid of drain flies?

Eliminate the breeding ground by cleaning all affected drains thoroughly, then maintain a weekly cleaning schedule. Drain flies cannot reproduce without the organic film inside pipes. Remove that, and they have nowhere to lay eggs.

What can I pour down my drain to get rid of drain flies?

Baking soda followed by vinegar, then boiling water. For persistent problems, an enzyme drain cleaner works overnight to digest organic buildup. Avoid bleach – it can damage pipes and septic systems without fully eliminating the biofilm.

Why am I suddenly getting drain flies?

Usually because a drain has developed enough organic buildup to support breeding. This happens gradually, so the flies seem to appear out of nowhere once the population reaches a visible level. Check for slow drains, unused drains with dry P-traps, or recent plumbing issues.

Are drain flies harmful?

No. Drain flies don’t bite, sting, or transmit diseases to humans. They’re a nuisance and a sign of a plumbing maintenance issue, not a health hazard.