How to Get Rid of Drain Flies

Quick Answer
To get rid of drain flies, find the drain they are breeding in, then remove the slimy film inside it. Tape or set a cup over each drain overnight to see which one produces flies. Pull out the drain cover, scrape and scrub the pipe walls with a stiff brush, clear the trap, and run water. Boiling water and bleach do not remove the film, so the flies come back.
On this page
- How do you get rid of drain flies, step by step?
- How do you know which drain the flies are coming from?
- Why don't boiling water and bleach get rid of drain flies?
- How long does it take to get rid of drain flies?
- Are drain flies the same as fruit flies or gnats?
- Should you use insecticide for drain flies?
- When should you call a plumber or pest professional?
- Frequently Asked Questions
- Our Take
- Sources
Key Takeaways
- Drain flies (moth flies) breed in the gelatinous film that lines sink, tub, shower and floor drains; the flies stop when that film is gone.
- A cup or jar placed upside down over a drain for 24 hours shows which drain is the source.
- Scrubbing the pipe walls with a stiff brush is the fix. University of California experts call boiling water and bleach "a common misconception."
- Insecticides are generally unnecessary in homes and only give short-term relief while the breeding film remains.
- If every drain is clean and flies keep appearing, look for a hidden leak or sewer break and call a plumber or a licensed pest professional.
How do you get rid of drain flies, step by step?
Drain flies go away when you remove the food their larvae live on. University of California IPM says females lay eggs in moist organic matter such as the slime in sink or shower drains, and that removing this organic film is the key to control [1]. Penn State Extension calls removing the breeding material "the most economical and sanitary way" to control moth flies [2]. Follow these steps:
- Confirm the fly. Drain flies are tiny, fuzzy and gray, with wide wings held like a roof over the body. They rest on walls near the tub or sink and make short, hopping flights.
- Test every drain. Cover each drain in the room overnight (see the cup test below) to find the one that is breeding flies.
- Remove the cover and scrape. Lift off the drain plate or stopper and scrape the slime from the pipe walls. UC IPM suggests a dull knife, then looking for larvae [1].
- Scrub the pipe. Work a long, stiff brush up and down inside the drain pipe, as far as it will reach. If the drain is slow, snake it first; under a sink, remove and clean the U-shaped trap.
- Flush and check. Run plenty of water to make sure it drains freely, then repeat the cup test a few days later.
- Keep it clean. A regular enzyme drain cleaner may help prevent new buildup [1].
The flies you see are only the adults; the problem is the slimy film inside the drain, and the flies stop when that film is gone.

How do you know which drain the flies are coming from?
Use a cup test. UC IPM's method: coat the inside of a plastic cup or glass jar with petroleum jelly or vegetable oil, turn it upside down over the drain opening, and leave it for 24 hours. Flies that come up out of the pipe stick to the inside, which tells you which drains are breeding sites. Put one over every drain in the room at the same time [1]. Penn State describes a similar check: place a jar over the drain, or tape a clear plastic bag over the overflow opening, and look for flies at intervals [2].
Check these places in the bathroom and kitchen:
| Drain or wet spot | Why flies breed there | What to do |
|---|---|---|
| Shower and tub drains | Hair and soap scum hold the film | Remove the cover, scrape and brush |
| Bathroom sink and overflow hole | Film builds up in the overflow channel | Brush the overflow; cup or bag test it |
| Kitchen sink drain | Food and grease feed the film | Brush the pipe; clean the trap under the sink |
| Floor drain (basement, laundry) | Often dry, then refilled with dirty water | Scrub, then run water through it regularly |
| Area around a sump pump | Standing water and debris | Clean out debris; keep the area dry |
| Leaking drain or sewer pipe | Wet, organic soil under floors or slabs | Call a plumber to find and fix the leak |
Breeding sites from UC IPM and Penn State Extension. UC IPM notes that the bathroom drain is the most common breeding site in homes [1].
Why don't boiling water and bleach get rid of drain flies?
Because they rush past the problem. UC IPM states plainly: "A common misconception is that pouring boiling water and/or bleach down a drain will control these flies," and explains that these treatments "do not remove the organic film within the drain," so control is short-term at best [1]. The film clings to the pipe walls, and liquid poured from above flows through the middle. Larvae deeper in the pipe survive and the flies return.
Scrubbing beats pouring: a stiff brush removes the film that boiling water and bleach slide past.
Never mix bleach with other drain or household cleaners. Some combinations, such as bleach with ammonia or with acidic cleaners, release toxic gas. If you use any cleaner, use one product at a time, follow its label, ventilate the room, and keep it away from children and pets. A drain cleaner made with enzymes or bacteria is a better match for this job. Penn State notes that these products break down the gelatinous scum, and are applied as a pour around the drain lip or as a foam [2].
How long does it take to get rid of drain flies?
Expect a week or two after a thorough cleaning. UC IPM reports that drain fly eggs hatch in about 48 hours and the full life cycle takes as little as 8 days or as long as 24 days, depending on temperature [1]. Penn State says larvae can mature in about two weeks under good conditions [2]. Adults that were already flying, or pupae that were not scrubbed out, can still show up for several days.
If you are still catching flies in the cup a week after cleaning, the drain was not fully scrubbed, a second drain is involved, or the source is somewhere else. Repeat the cup test on every drain before trying anything new. A fly swatter or vacuum handles the adults you see in the meantime.
Are drain flies the same as fruit flies or gnats?
No, and the difference changes the fix. Drain flies breed in drains, fruit flies in fermenting food, and fungus gnats in damp potting soil. Here is a quick way to tell them apart:
Drain flies are about 1/12 to 1/8 inch long. University of Minnesota Extension describes them as dark and hairy, with pointed wings held roof-like over the body, found especially in bathrooms, kitchens and other rooms with drains, and active at any time of year [3]. Fruit flies are tan in front with darker abdomens and red eyes [4]. Fungus gnats are black, about 1/8 inch, with long legs and antennae, and live around overwatered houseplants [5]. If you have one of the others, see how to get rid of fruit flies or how to get rid of gnats, or try the bug identifier tool.
Should you use insecticide for drain flies?
Usually not. UC IPM says chemical control is generally unnecessary, because results are temporary unless breeding sites are removed, and it discourages insecticide use in homes, where cleaning one or a few drains usually solves the problem [1]. Do not pour insecticide into drains. If you choose a household fly spray for adults while you clean, use only an EPA-registered product labeled for that use. Read and follow the label. The label is the law. Keep it away from children, pets and food surfaces.
Drain flies do not bite people or pets and do not damage the house. UC IPM notes they can carry bacteria from breeding sites to other surfaces, and large numbers of dead flies can become allergens, so they are worth clearing out, especially in a kitchen [1].
When should you call a plumber or pest professional?
Most drain fly problems end with a brush. Call for help when:
- Every drain tests clean but flies keep coming. UC IPM notes that pipes in crawl spaces, wall voids and under concrete slabs may need to be inspected for breaks or leaks [1]. A plumber can find a broken drain or sewer line.
- You see large numbers of flies. UC IPM says large numbers suggest a breeding site bigger than a few indoor drains.
- The source is hidden in a wall void or under the foundation. UC IPM advises contacting a professional pest control service in that case, and says pesticides there should be applied only by licensed applicators.
- You smell sewage or see wet spots on floors or walls, which also point to a leak.
If every drain is clean and the flies keep coming, look for a leak, not a stronger product.
For other bathroom and kitchen pests, browse the How to Get Rid Of guides or the drain fly profile.
Frequently Asked Questions
Where do drain flies come from?
They breed in the gelatinous film inside sink, tub, shower and floor drains, and in other wet organic matter such as the soil under a leaking sewer pipe. Penn State notes they can also come from nearby sewage plants and waste areas [2].
Do drain flies bite?
No. UC IPM states that moth flies do not bite people or animals [1]. They are a nuisance that can land on people or fall into food.
Why do drain flies come back after I clean?
The film was not fully removed, another drain is also breeding flies, or the source is a hidden leak. Repeat the cup test on every drain in the room for 24 hours to find out which.
Our Take
We think drain flies are one of the most fixable pests in a home, and also one of the most mishandled. The instinct is to pour something hot or harsh down the drain, and by UC IPM's account that is exactly what does not work, because the film the larvae live in clings to the pipe walls. The cheap, unglamorous answer is a cup test to find the right drain and a stiff brush to scrub it. We would skip insecticides entirely here. If a clean drain still produces flies, we would rather see a plumber look for a broken pipe than see more products go down the sink.
Sources
- Pest Notes: Moth or Drain Flies. UC IPM, 2014.
- Moth Flies in the Home. Penn State Extension, 2014.
- Moth flies (drain flies): What insect is this?. University of Minnesota Extension.
- Fruit flies: What insect is this?. University of Minnesota Extension, 2026.
- Fungus Gnats as Houseplant and Indoor Pests (Fact Sheet 5.584). Colorado State University Extension, 2025.
Pest activity and species vary by region. If you are unsure what you have, your local Cooperative Extension office can identify it. Always read and follow pesticide labels. Spotted an error? Tell us.





