Help, how do I get rid of drain flies?

Disclosure: Links to products may be affiliate which means I get commissions for purchases. Sponsored posts will always be clearly disclosed as such.Privacy Policy

Dear Home-Ec 101,

I have three window wells in my finished basement.  I am forever finding little black dead flies.  I have sprayed, thrown gallons of bleach and ammonia down the window wells.  In the window wells I found something like yellow cocoons that I think they have built.  There were several in each well.  I knocked them down and covered them with bleach.  No help.  Lately, I have been finding a couple dozen dead on the kitchen floor. The minute you touch them they fall apart.  Could you tell me what they are, and what I need to do to get rid of them?


Dear Shoo-Fly,

Please tell me gallons of water and a lot of time came after the use of bleach and before the ammonia was used in the same drain. This tactic could have had tragic consequences.

I have good news and I have bad news. First, what you are dealing with is a nuisance pest known as drain flies or drain moths. Yes, they are kind of gross, but they don’t spread disease. The flies are not responsible for the cocoons. Without knowing where you live, I would consider spiders as the likely culprit for the cocoons and they probably moved in once they heard about the drain fly buffet in the window well. I would leave them alone until you get the drain flies under control, which could take a while.

Another cocoon builder to consider, if you found them with grass or straw, is a type of wasp that eats stink bugs. If you’ve ever dealt with stink bugs, you’d probably roll out the welcome mat for this insect.

The bad news is that in your situation the drain flies are likely going to be difficult to fully clear up. You’ll need to address the issue on several fronts and decide if it is worth the bother or not.

The drain fly lifecycle is semi-aquatic, the larvae live in the organic matter that builds up on the inside of drains. Outdoor drains, such as the ones that are probably in your window well can become partially or fully clogged with organic matter like grass, dirt, other bugs. This organic matter, plus the water that will pool due to the clog, creates the perfect drain fly nursery. You may as well be playing Barry White and offering wine.

Later the spiders and wasps heard about the party and decided to crash.

All would be well and ignorable if they hadn’t found a way into your basement and the rest of the house. Job one is to figure out where bugs can squeeze into your house and fix those gaps.

Once you have stopped the invasion, it is time to tackle the indoor issue.

Some of your window well friends spread their little wings and moved in. Many basements have a floor drain(s) or a laundry sink. Both of these tend to get ignored until they become a problem. Chlorine bleach is not a good solution as it doesn’t take care of the organic matter. As your drain fly colony expands, they seek new territory and are moving on to your kitchen and sooner or later any drain in your house.

While I’m not a fan of using heavy duty drain cleaners as a first solution for a clogged drain, you’re an exception. To fully conquer the indoor issue, it is imperative for you to clean every drain in your home on the same day. Work from the top floor to the basement. You need to use the tactic or you’ll spend a very long time chasing the little buggers from drain to drain, eventually using more chemical than if you’d tackled it correctly the first time. You need to clean your indoor drains fully and many of them won’t be easily accessible due to being partially underground. If you were writing to me about a slow drain, I’d suggest other methods, this is an insect infestation and entirely different.
Go ahead and get the Draino. If this approach really bothers you, plant a tree when you’re done.

Finally, consider cleaning the drains in your window wells so they can’t find a new way in. If you don’t have actual drains you have water pooling and stagnating in the bottom of the well. You’ll definitely need to address this before it begins seeping into your basement.

Good luck!

Send your household questions to

Klass, Carolyn. “Drain Flies or Moth Flies.” Insect Diagnostic Lab Factsheet. Cornell University, Revised Jan. 2016. Web. 28 Mar. 2017. <>.

“The BugGuide.” The BugGuide.University of Iowa Entomology Department, n.d. Web. 28 Mar. 2017. <>. Various entries searching for cocoons

How to get rid of drain flies, once and for all.

Sharing is caring!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.