How to Get Rid of Drain Flies for Good


Getting rid of drain flies, also known as sewer flies or moth flies, requires eliminating their breeding and resting sites. Here’s a brief summary of how to get rid of drain flies:

  • Identify Breeding Sites: Locate the breeding sites of drain flies, which are usually in the organic material buildup inside drains, especially in sink, shower, or floor drains. Inspect for any decaying matter or sludge.
  • Clean Drains: Clean the infested drains thoroughly. Remove debris, gunk, and slime using a brush or drain snake. Use a pipe brush or bottle brush to reach deep into the drain and scrub away the organic matter.
  • Boiling Water: Pour a pot of boiling water down the drain to help flush out any remaining debris and kill drain fly larvae. Repeat this process several times if necessary.
  • Baking Soda and Vinegar: Pour a mixture of baking soda followed by vinegar into the drain. Allow it to fizz for about 15-30 minutes. This helps break down any remaining organic matter. Rinse with hot water.
  • Use Drain Cleaners (Caution): If the infestation persists, consider using a commercial drain cleaner designed to dissolve organic material. Follow the manufacturer’s instructions carefully, and use these products sparingly as they can be harsh.
  • Seal Cracks and Leaks: Inspect the area around the drains for any cracks or leaks. Seal any openings or gaps with caulk to prevent flies from entering or laying eggs.
  • Maintain Good Drain Hygiene: To prevent future infestations, practice good drain hygiene by regularly cleaning and flushing drains with hot water. Use drain covers or strainers to prevent debris from entering the pipes.
  • Fruit Fly Traps: Set up fruit fly traps near infested drains. These traps can help capture adult drain flies. Commercial fruit fly traps are available or you can create DIY traps using apple cider vinegar and dish soap.
  • Professional Help: If the infestation is severe or persists despite your efforts, consider seeking professional pest control services. They have specialized treatments and tools to eliminate drain fly infestations.

Where Do They Come From?

Drain flies are found in moist surfaces with highly organic matter like kitchen and bathroom drains, which provide them with a source of nutrition as well as favorable breeding spots. Slow draining or clogged fixtures, leaking or dirty drains increases the likelihood of drain fly infestation.

You can have drain flies in your home even if your level of hygiene is top notch. Why is this possible? The answer lies in how your drains are designed to work.


If you open your kitchen or bathroom sink cabinet, you will see that a part of drainpipe is bent in to a U-shape. That is called a drain trap or a P-trap. Every drain in your house has a P-trap although you cannot see some of them like the one in your tub/shower drain.

The drain trap has 2 main functions:

  • It at all times holds a small amount of water which acts as a barrier preventing sewer smells from coming up to your house through the drain. Sewer gases should exit the house through the vent stack.
  • It traps potential drain clogs, preventing them from clogging the drainpipe farther away where unclogging it would be way harder.

The P-trap therefore contains moisture and organic matter, which are the perfect conditions for drain flies to thrive.

Every time you run your garbage disposal, shave in the bathroom sink, soak in the tub or take a long shower, not all organic matter will flow down the drain. Some of it will be trapped in the drainpipe or P-trap and that is what drain flies feed on.

The organic matter in the drainpipe or P-trap provides a source of nutrition for drain flies. They will also lay and hatch their eggs in a few days and hence their multiplication.

Drain flies are non-biting and are therefore not dangerous. Their presence is however unsightly and implies poor hygiene. Though drain flies are themselves not harmful, they can transfer bacteria from the drains to other parts of the house and if they come into contact with food could causes diseases.

How to Get Rid of them


In order to get rid of drain flies in your home, you need not only focus on the ones patched up in your walls, ceiling and around drains, but the ones you can’t see. The larvae and/or eggs inside the drainpipe.

There are 2 ways to do that. You can either decide to use chemical drain cleaners or fly repellants, or use natural methods. I am all in favor of getting rid of drain flies using natural methods.

The following are the ways to get rid of drain flies naturally:

1. Unclog Slow Draining Fixtures

Slow draining or clogged fixtures are a source of stagnant want, but most importantly the indicate that the drainpipe or P-trap is not fully open. That means that there is organic gunk in the drain trap which is providing nourishment to the drain flies and thereby facilitating their multiplication.

If the drain flies are coming from your kitchen or bathroom sink, unclogging the drain is actually really easy. You can either use a drain snake to unclog it or you can remove the P-trap to get access to the drainpipe.

I prefer removing and cleaning the P-trap manually since a drain snakes can damage your drain especially if it is made of plastic.


To remove your sink’s drain trap, duck under the sink and remove all the stuff you have stored there. The drain trap has 2 connections, one on the long arm and the other one the short arm.

If your sink’s drainpipe is made of plastic, the connections will most likely be hand tight. Use a wrench or slip-joint pliers if the drainpipe and connections are metallic. To avoid, spilling water on your floor, have a bucket all small pan to collect the water already in the drain trap.

If you have a double-bowl kitchen sink with a garbage disposal, take your time to clean the pipe connecting the garbage disposal to the trap. More information on how to fix a slow draining garbage disposal here.

Drain flies around your shower drain are attracted to the hair and dead body cells trapped inside the drainpipe and trap. In order to fix a slow draining shower drain, you will first need to remove the drain cover.

With the drain cover out, insert a hair removal tool inside the drain to catch and pull out as much hair as possible. This tool can also be used to unclog a bathroom sink.


If you don’t have the hair removal tool, grab a wire coat hanger and straighten it. Using a pair of pliers, make a small hook on one end of the wire. Use it to fish out the hair gunk from the shower drain.

Unclogging a slow draining bathtub is same as that of shower drain. With tubs though, you can decide to snake the drain through the opening at the bottom or through the overflow drain. That will also depend on the type of bathtub stopper you have.

2. Fix Leaking Drains

This mostly applies to sinks and toilets. A leaking drain provides the moisture and nutrients needed by the drain flies to survive and multiply.

Not all toilet leaks will bring about drain flies. The one toilet leak that will attract drain flies to your bathroom is when the toilet is leaking from the base. This happens when you flush the toilet.

A toilet that leaks from the base/bottom is caused by a wax ring that is not leaking, broken toilet flange or basically a loose/wobbly toilet. This causes water (with little amounts of waste) to pool around the base of the toilet.

Fixing the toilet by replacing the wax ring or closet flange will fix the problem for good. A leaking toilet can also bring a sewage smell in your house or cause the basement ceiling to be wet.

Kitchen and bathroom sinks leak from the bottom. That could be caused by a loose/bad sink flange or loose connections especially around the P-trap. Waste from the kitchen or body cells leaks to the floor with the water, inviting drain flies to the kitchen or bathroom.

Depending on the problem, you will need to either remove and seal the sink drain, or tighten the loose connections. Both are easy tasks and if you need to buy anything it is just the sealant (plumber’s putty or silicone caulk).

Please note that if there is leak around the house, either a burst sewer line or full septic tank, drain flies will still roam freely in your property. Stagnant water like the one in a sump pump pit will also attract drain flies.

3. Clean the Drains

After fixing slow draining and leaking fixtures, the next thing is to clean the drains. This is something I would suggest you get into the habit of doing even without drain flies infestation. Apart from keeping drain flies at bay, it also helps to prevent drain clogs.

To clean drains, I prefer using 3 substances. These are baking soda, vinegar and boiling water.

This is how to clean your drains and get rid of drain flies:

  • Pour 1 cup of baking soda down the affected drain.
  • Slowly add 1 cup of vinegar.
  • If your drain has an overflow drain (sinks and bathtubs), insert a funnel inside the overflow drain and pour ¼ cups of each baking soda and vinegar.
  • Wait for 15-30 minutes.
  • Blast boiling hot water down the drain. Do the same for the overflow drains.

Baking soda and vinegar are very effective in breaking down gunk/biofilm in the drainpipe and trap. The hot water will further break down the gunk, drain flies’ eggs and larvae even more, and wash them down the drain leaving the drains clear.

If you have a double-bowl kitchen sink with a garbage disposal connected to the drain trap, don’t forget to clean both sinks. For people with a dishwasher connected to the garbage disposal, remove the dish racks and run a cycle using a cup of baking soda and vinegar as well.

After eliminating any stagnant/pooling water, organic gunk as well as the larvae, it is now time to deal with the drain flies patched up in your walls, floor and ceilings. This is how to go about it:

4. Spray Them with Dish Soap

You can use a home-made insecticide to easily get rid of drain flies in your home. Mix equal volumes of dish soap and warm water (amount depends on severity of infestation) in a spray bottle and use it to spray the drain flies.

This concoction will eliminate the drain flies but is not harmful to your household or pets. You may however need to do it several times to completely get rid of them

5. Trap Them with Apple Cider Vinegar

Drain flies are attracted to the nice smell of the apple cider vinegar and you should use it as a bait. Here is how it works:

  • Pour apple cider vinegar in bowl up to the ¼ level mark.
  • Cover the bowl with a clear plastic wrap and secure it with a rubber band.
  • Use a toothpick to poke holes on the wrap.
  • Place the bowl nearer to the drain fly-infested drain.
  • Wait.

Dray flies will be attracted to the nice smell of the apple cider vinegar and go in through the holes on the wrap but will be unable to fly out.

Chemical Products Alternatives

There are a lot of products in shelves that will help you clean your drains and get rid of drain flies. This is totally perfect if that is the route you wish to follow.

A good drain cleaner for people on a septic system should be enzyme-based. Those will not kill the microbes in the septic tank.

For people on a septic system, take your time to read the product’s label (ingredients) to establish if it is septic-safe. People using the city sewer system have nothing to worry about.

Some of these products are:

  • Drano
  • Green Gobbler (enzyme drain cleaner)
  • Rockwell inVade Bio Drain Gel

If you need to spray the drain flies with an insecticide, you can typically use the same pesticides used to spray fruit flies, gnats and other pests.

For people who want to outsource drain flies control services, you can hire a professional pest control company to get rid of the drain flies for you. Terminix and Orkin are 2 of the well-known pest control companies.

How to Prevent them from Coming Back

If you want to keep drain flies at bay in your home, you must not lower your guard when it comes to drain cleaning. You actually don’t need to do a lot.

Pouring vinegar, baking soda followed by a gallon of boiling water will break down gunk in your drains leaving them clear and without order.

Another way to prevent drain fly infestation is by clearing any stagnant water around your home and clearing slow draining or clogged fixtures. If a certain drain is leaking, fix it as soon as possible.

For more information on drain flies prevention check out this article.

Leave a Comment