How to Get Rid of Drain Flies (2026 Guide)
Last updated: March 29, 2026
Drain flies breed in the organic film that coats the inside of household drains. Cleaning the drain and eliminating this biofilm is the only reliable way to get rid of them, and most homeowners can do it for under $20 in about a week. Drain flies are not a sign of a dirty home. They appear whenever organic matter builds up inside pipes, which happens naturally over time in every household. The small, fuzzy, moth-like flies that rest on bathroom walls and hover near sinks are almost always drain flies, and they will keep returning until you address the biofilm inside the pipe where they lay their eggs.
This guide covers identification, the step-by-step removal process, what does not work, when drain flies signal a more serious plumbing problem, professional treatment costs, and prevention. For a broader overview of pest control pricing, see our pest control cost guide.
- Drain flies breed in the biofilm (organic slime) inside drains, not in standing water alone.
- The tape test confirms which drains are breeding sources: tape a drain overnight and check for trapped flies in the morning.
- Physical brushing of the drain interior combined with bacterial drain gel eliminates most infestations within 7 to 14 days.
- Bleach, chemical drain cleaners, and bug spray do not work because they do not remove the biofilm.
- Most drain fly problems cost under $20 to fix with a drain brush and bacterial gel.
- Persistent drain flies after two weeks of treatment may indicate a cracked pipe or broken sewer line requiring a plumber.
What Are Drain Flies?
Drain flies are small, fuzzy, moth-like insects that measure 2 to 5 millimeters in length. They have broad, leaf-shaped wings covered in tiny hairs, which gives them a distinctly furry appearance. When at rest, drain flies hold their wings flat over their body in a roof-like position. They are weak fliers and tend to make short, hopping flights rather than sustained flying. You will most often spot them resting on walls, ceilings, and mirrors near bathrooms, kitchens, and laundry rooms.
Drain flies go by several names. You may see them referred to as moth flies, sewer flies, sewer gnats, or filter flies. They all refer to the same insect: members of the family Psychodidae, most commonly the species Clogmia albipunctata in North American homes. Despite their association with drains and sewers, drain flies are harmless to humans. They do not bite, do not sting, and do not transmit diseases in typical household settings.
Life cycle
A female drain fly lays 30 to 100 eggs at a time directly on the biofilm inside a drain. The eggs hatch within 32 to 48 hours. Larvae feed on the organic matter in the biofilm for 9 to 15 days before pupating. The entire life cycle from egg to adult takes approximately two to three weeks at room temperature. Adults live for about two weeks. This rapid reproduction cycle is why drain fly populations seem to appear suddenly and grow quickly once conditions are right.
Understanding the life cycle is key to treatment timing. Even after you clean a drain thoroughly, eggs and larvae already present in the pipe continue developing. This is why treatment must be sustained for at least one to two weeks rather than applied once. A single cleaning kills the adults you see, but larvae deeper in the biofilm survive and emerge days later as new adults.
What biofilm is and why it matters
Biofilm is a thin layer of organic material that accumulates on the interior walls of drain pipes over time. It consists of bacteria, fungi, decomposing food particles, soap residue, hair, skin cells, and other organic debris. In a functioning drain, water flow keeps this buildup minimal. In slow-draining or infrequently used drains, biofilm grows thicker and provides the ideal breeding environment for drain flies. The larvae feed on this material, and adult females lay eggs directly on its surface.
Removing the biofilm removes the food source and breeding substrate simultaneously. This is why treatments that target the biofilm (brushing, bacterial gel) work, while treatments that target the flies themselves (bug spray, surface cleaners) do not.
How Do You Tell Drain Flies from Fruit Flies and Gnats?
Drain flies are frequently confused with fruit flies and fungus gnats because all three are small flying insects that appear indoors. Treating for the wrong insect wastes time and money. The key differences are in their appearance, behavior, and where they congregate. A quick visual check and location assessment is usually enough to tell them apart.
| Feature | Drain Fly | Fruit Fly | Fungus Gnat |
|---|---|---|---|
| Size | 2 to 5 mm | 2 to 4 mm | 2 to 3 mm |
| Appearance | Fuzzy, moth-like, broad wings | Tan/brown body, bright red eyes | Dark gray/black, long dangling legs |
| Wing shape | Broad, leaf-shaped, held flat | Clear, narrow, standard fly wings | Narrow, translucent |
| Flight pattern | Short hops, weak flier, rests on walls | Active hovering near food | Slow, erratic, near soil |
| Where found | Walls near sinks, showers, floor drains | Near fruit, trash, recycling bins | Near houseplants, windows |
| Breeding source | Biofilm inside drain pipes | Rotting fruit, fermented organic matter | Moist potting soil |
The tape test
The simplest way to confirm drain flies is the tape test. Before bed, place a piece of duct tape or clear packing tape over the drain opening with the sticky side facing down. Do not seal the drain completely; leave small gaps at the edges so air can still flow through and attract the flies upward. In the morning, check the underside of the tape. If small, moth-like flies are stuck to it, that drain is a confirmed breeding source.
Test every drain in your home, not just the one closest to where you see the flies. Drain flies can travel short distances from their breeding site, so the drain in a guest bathroom down the hall could be the actual source even if flies appear near the kitchen. Test bathroom sinks, shower drains, bathtub drains, floor drains, utility sinks, and the kitchen sink. Run the tape test for two to three consecutive nights on each drain, since fly emergence can vary from night to night.
If the tape test produces no results on any drain but you still see moth-like flies, consider other potential breeding sites: air conditioning drip pans, sump pump basins, or leaking pipes behind walls. Our pest identifier tool can help you confirm the species if you are unsure.
Why Do Drain Flies Appear?
Drain flies appear when conditions inside a drain provide the biofilm they need to breed. Several common household situations create these conditions. Understanding the cause helps you target the right drain and prevent future infestations.
Biofilm buildup in active drains
Even drains that are used daily accumulate biofilm over time. Soap, toothpaste, shaving cream, food particles, grease, and hair all contribute to the organic layer coating the pipe interior. Kitchen sinks and bathroom sinks are the most common sources because they receive a steady supply of organic material. Garbage disposals are particularly prone to biofilm buildup because food particles collect in the splash guard, disposal chamber, and the connecting pipe.
Slow-draining pipes are especially problematic. When water drains slowly, it sits in contact with the pipe walls longer, feeding the biofilm and keeping it moist. A drain that takes several seconds to empty after you stop running water likely has significant internal buildup.
Standing water in P-traps
The P-trap is the U-shaped section of pipe under every drain. It holds a small amount of water that acts as a seal against sewer gases. In drains that are used regularly, this water stays fresh. In drains that go unused for weeks or months, the water in the P-trap can become stagnant and develop a biofilm layer on its surface. This stagnant water combined with biofilm on the pipe walls above the water line creates an ideal breeding environment.
Rarely used drains
Guest bathrooms, basement floor drains, laundry room drains, and seasonal bathroom fixtures are the most common sources of drain fly infestations for this exact reason. When a drain sits unused, the P-trap water evaporates partially, moisture remains on the pipe walls, biofilm develops undisturbed, and there is no water flow to flush away eggs or larvae. Many homeowners first notice drain flies in a guest bathroom that has not been used in several weeks.
Leaking or damaged pipes
A cracked drain pipe, a loose pipe joint, or a pipe with a pinhole leak creates a constant moisture source in areas that are difficult to inspect and clean. Water seeping into a wall cavity, under a slab, or into crawl space soil provides the damp organic environment drain flies need. These situations are less common than simple biofilm buildup but are the primary reason some infestations resist standard treatment. If DIY methods fail after two weeks, a hidden leak is a likely cause.
Septic system issues
Homes on septic systems can develop drain fly problems when the system is not functioning properly. A full or failing septic tank, a clogged drain field, or a broken connection between the house and the tank can create conditions that support massive drain fly populations. Septic-related drain fly problems tend to be more severe and widespread than those caused by a single clogged drain.
Dealing with persistent drain flies? Call (866) 821-0263 to connect with a licensed pest control professional in your area for a free assessment.
Get a Free Quote: (866) 821-0263How Do You Get Rid of Drain Flies Step by Step?
The removal process targets the biofilm breeding source inside the drain. Most infestations resolve within 7 to 14 days with consistent daily treatment. The total cost for DIY treatment is typically $10 to $20 for a drain brush and a bottle of bacterial drain gel. Here is the process broken into eight steps.
Step 1: Perform the tape test on every drain
Before treating anything, identify which drains are actually producing flies. Place tape over every drain in the home (sticky side down) before bed. Check each piece in the morning. Test for two to three consecutive nights because emergence can be inconsistent. Mark each drain that catches a fly. This step prevents you from wasting time cleaning drains that are not part of the problem.
Do not skip drains you think are unlikely sources. Floor drains in basements and garages, the overflow hole in bathroom sinks, and drains in laundry rooms are frequently overlooked. Test every drain that connects to your plumbing system.
Step 2: Remove the drain cover and inspect
Take the drain cover, stopper, or strainer off each affected drain. Use a flashlight to look inside the pipe. You will likely see a dark, slimy coating on the pipe walls. This is the biofilm where drain fly eggs, larvae, and pupae are living. In heavily neglected drains, the biofilm can be thick enough to partially obstruct the pipe. Note the severity of the buildup in each drain so you can gauge how many days of treatment each one will need.
Step 3: Manually brush the drain interior
This is the single most important step. Insert a stiff drain brush (sometimes called a pipe brush or bottle brush for drains) into the pipe and scrub the interior walls vigorously. Work the brush up and down, rotating it to contact as much of the pipe surface as possible. You are physically scraping away the biofilm layer that the flies depend on for breeding.
For bathroom sink drains, remove the pop-up stopper mechanism to access the pipe directly. For shower drains, remove the strainer plate and any hair catcher. Scrub the vertical section of pipe as far down as the brush will reach. The goal is to remove the majority of the visible biofilm in a single session. This step alone kills a significant portion of the larvae and removes the substrate where eggs are laid.
Drain brushes designed for this purpose cost $5 to $10 at hardware stores and online retailers. A standard bottle brush works as a substitute for smaller drains. Do not use a toilet plunger or standard plumbing snake for this purpose; they do not scrub the pipe walls.
Step 4: Flush with boiling water
Boil a large pot of water (at least half a gallon) and slowly pour it down each affected drain. The boiling water loosens and flushes away the biofilm that the brush dislodged from the pipe walls. Pour slowly over 30 to 60 seconds to maintain contact with the pipe interior. This step is a supplement to manual brushing. Boiling water alone, without brushing first, will not remove established biofilm.
Caution: if your home has older PVC pipes (typically white plastic), use very hot tap water instead of boiling water. Boiling water can soften PVC joints over time. Metal and newer CPVC pipes handle boiling water without issue.
Step 5: Apply bacterial drain gel
Pour a bacterial drain gel into each affected drain according to the product label. Products like InVade Bio Drain, Green Gobbler Drain Fly Treatment, and Drain Gel contain natural bacteria and enzymes that actively digest organic matter and biofilm. Apply the gel in the evening, ideally right before bed, and avoid running water through the drain for at least 6 to 8 hours. This gives the bacteria time to colonize the pipe walls and begin breaking down the remaining organic film.
Bacterial drain gels cost $15 to $25 for a bottle that lasts through a full treatment cycle and provides enough for monthly prevention afterward. They are available at hardware stores, home improvement stores, and online. These products are non-toxic, safe for all pipe materials, and safe for septic systems.
Step 6: Repeat the gel treatment daily for 5 to 7 days
Apply the bacterial drain gel every evening for at least 5 consecutive days. For drains with heavy buildup, continue for a full 7 days. Biofilm accumulates in layers over weeks and months, and a single application cannot digest it all. Consistent daily treatment ensures the beneficial bacteria fully colonize the pipe and break down the organic material layer by layer. During this period, continue to use the drain normally during the day. Just apply the gel in the evening and let it sit overnight.
Step 7: Re-test with the tape method
After completing the initial treatment period (5 to 7 days of daily gel application), repeat the overnight tape test on all previously affected drains. Run the tape test for two consecutive nights. If no flies appear on the tape either night, the breeding source has been eliminated. The few remaining adult flies in the home will die within about two weeks since their lifespan is short and they can no longer reproduce.
If flies still appear on the tape after the initial treatment period, continue the gel treatment for another 7 days. Some drains with years of accumulated buildup require up to 14 total days of treatment. If flies persist beyond 14 days of consistent treatment, the breeding source may not be the drain itself. At that point, investigate hidden sources (leaking pipes, cracked drain lines, sump basins) or call a professional.
Step 8: Implement monthly prevention
After the infestation is cleared, maintain your drains with a monthly application of bacterial drain gel. This prevents biofilm from re-accumulating to levels that support drain fly breeding. Run water through every drain in the home at least once per week, paying special attention to guest bathrooms, basement floor drains, and other fixtures that receive infrequent use. Clean drain stoppers, strainer baskets, and overflow holes once per month by removing them and wiping them down.
For a deeper look at whether your pest situation warrants DIY treatment or professional help, see our DIY vs. professional pest control guide.
What Does NOT Work for Drain Flies?
Several commonly recommended drain fly treatments are ineffective. Understanding why they fail saves time, money, and frustration. The underlying principle is simple: anything that does not physically remove or biologically digest the biofilm inside the pipe will not eliminate drain flies permanently.
Bleach
Pouring bleach down a drain may kill a few larvae or adult flies it contacts directly, but it does not break down biofilm. Bleach is a surface disinfectant, not a degreaser or organic solvent. The biofilm coating the inside of a drain pipe is a complex organic matrix that bleach cannot penetrate effectively. Within days of a bleach treatment, the biofilm is recolonized by bacteria and drain fly eggs. Bleach also loses its potency quickly when diluted by standing water in the P-trap.
Chemical drain cleaners (Drano, Liquid-Plumr)
Chemical drain cleaners are designed to dissolve hair clogs and grease blockages, not to remove the thin biofilm layer that drain flies breed in. They pass through the pipe too quickly to have sustained contact with the pipe walls, and they do not leave behind any residual treatment. They are also corrosive to certain pipe materials and harmful to septic systems. Using chemical drain cleaners for drain flies is both ineffective and potentially damaging to your plumbing.
Bug spray and insecticide
Spraying a can of Raid or another household insecticide near a drain kills adult flies on contact but has zero effect on the eggs, larvae, and pupae inside the pipe. Since the entire breeding population lives inside the drain, killing a few adults on the bathroom wall does nothing to reduce the overall population. New adults emerge from the pipe within hours to replace the ones you killed. Insecticide also does not belong inside plumbing.
Vinegar and baking soda
The vinegar and baking soda combination produces a satisfying fizzing reaction but does not generate enough force or chemical action to remove biofilm from pipe walls. The reaction is brief, the resulting solution is weak, and it passes through the drain too quickly. This method is a popular home remedy that creates the appearance of activity without delivering results. It is roughly equivalent to pouring water down the drain in terms of drain fly elimination.
Pouring boiling water alone
Boiling water can loosen biofilm, but without physical brushing beforehand, it simply flows over the surface of the biofilm without removing it. The water contact time is too short to kill all larvae or dissolve the organic matrix. Boiling water is a useful supplement after brushing, but it is not a standalone treatment.
Fly traps and fly strips
Sticky fly traps catch adult drain flies, which provides temporary relief from seeing them on walls and mirrors. However, trapping adults does not affect the breeding population inside the drain. Female drain flies lay dozens of eggs at a time, and the population replenishes faster than traps can capture adults. Fly traps are useful as a monitoring tool to gauge population levels during treatment, but they should not be confused with a treatment method.
Tried DIY methods without success? Call (866) 821-0263 to speak with a licensed pest control professional who can identify the source and recommend the right treatment.
Get a Free Quote: (866) 821-0263When Do Drain Flies Indicate a Bigger Problem?
In most cases, drain flies are a minor nuisance that resolves with basic drain cleaning. However, there are situations where their presence points to a more serious issue that requires professional attention. If your drain fly infestation does not respond to two weeks of consistent DIY treatment, one of the following may be the cause.
Cracked or broken drain pipe
A crack in a drain pipe below the floor or behind a wall allows wastewater to seep into surrounding soil or building materials. This creates a permanent moisture and organic matter source that drain flies exploit. You cannot reach this breeding site with a drain brush or bacterial gel because it is outside the pipe. Signs of a cracked drain pipe include persistent drain flies despite treatment, damp spots on floors or walls near plumbing, musty odors that do not go away, and slow drains that have been snaked without improvement. A plumber can perform a camera inspection of the drain line to confirm a crack.
Broken sewer line
A damaged main sewer line between the house and the municipal connection (or septic tank) can produce large numbers of drain flies that emerge from multiple drains simultaneously. This is different from a single-drain infestation in both scale and persistence. Sewer line damage is caused by tree root intrusion, ground settling, aging clay or cast iron pipes, or construction activity. If drain flies appear in large numbers from several drains at once, especially accompanied by sewage odors and slow draining throughout the house, a sewer line inspection is warranted.
Septic system failure
Homes on septic systems can develop severe drain fly infestations when the system is not functioning correctly. A full septic tank, a saturated drain field, or a blocked distribution box can cause wastewater to back up or pool in areas that become massive drain fly breeding sites. If you are on a septic system and experience a sudden, severe drain fly infestation, have the system inspected and pumped if necessary.
When to call a plumber vs. pest control
For a standard biofilm-related drain fly problem, you do not need either a plumber or a pest control company. DIY treatment works. If DIY treatment fails, call a pest control professional first. They can confirm that the insects are indeed drain flies (and not a different species), locate the breeding source using professional inspection methods, and apply commercial-grade treatments. If the pest control professional determines the source is a structural plumbing issue (cracked pipe, broken sewer line), they will refer you to a plumber. For guidance on when professional pest control makes sense, see our article on when to call an exterminator.
How Much Does Professional Drain Fly Treatment Cost?
Professional drain fly treatment typically costs $100 to $200 for a standard residential service. This includes inspection of all drains, identification of the breeding source, application of commercial-grade bacterial treatments or foaming agents, and one or two follow-up visits.
| Service | Cost Range | What Is Included |
|---|---|---|
| DIY (drain brush + bacterial gel) | $10 to $20 | Brush, one bottle of drain gel, 1 to 2 weeks of self-treatment |
| Professional drain fly treatment | $100 to $200 | Inspection, commercial drain treatment, 1 to 2 follow-up visits |
| Drain camera inspection (plumber) | $150 to $500 | Video inspection of drain interior to check for cracks or damage |
| Drain pipe repair | $200 to $2,000+ | Repair or replacement of damaged drain section (if cracked pipe is the cause) |
The reality is that most drain fly infestations are entirely DIY-solvable for under $20. Professional pest control makes financial sense only when the source cannot be identified or when standard treatment has failed after two weeks of consistent effort. The most common reason DIY treatment fails is an incomplete treatment cycle (stopping after a few days instead of continuing for the full 7 to 14 days) rather than a genuine need for professional intervention.
If you do hire a professional, expect the service to include an inspection of all household drains, application of a commercial foaming drain treatment, and a scheduled follow-up visit one to two weeks later to verify the infestation has been resolved. Some companies include drain fly service as part of a general pest control plan. See our pest control cost guide for a comprehensive pricing breakdown.
Which Rooms Are Drain Flies Most Common In?
Drain flies can appear anywhere there is a drain connected to your plumbing system, but some rooms are far more likely to harbor infestations than others. The common thread is a drain with organic buildup, slow drainage, or infrequent use.
Bathrooms
Bathrooms are the most frequent location for drain fly infestations. Shower drains accumulate hair, soap scum, and skin cells. Bathroom sink drains collect toothpaste, shaving cream, and soap residue. The combination of organic matter and constant moisture creates ideal biofilm conditions. Shower drains are particularly prone because the drain cover often traps hair that further slows drainage and promotes buildup. The overflow hole in bathroom sinks is another commonly overlooked breeding site, since it collects organic residue and is rarely cleaned.
Kitchens
Kitchen sinks, especially those with garbage disposals, are the second most common breeding site. Food particles, grease, and soap accumulate in the disposal chamber, the splash guard, and the pipe connecting the disposal to the drain. The area under the rubber splash guard flaps is particularly problematic because it traps food residue in a warm, moist environment. Dishwasher drain connections can also harbor biofilm, especially if the dishwasher drain hose has a low point where water pools.
Laundry rooms
Washing machine drain standpipes and floor drains in laundry rooms accumulate lint, fabric softener residue, and detergent buildup. These drains are often slow because the lint gradually clogs the pipe interior. Laundry room floor drains that are present for overflow protection but rarely receive direct water flow are especially prone to P-trap evaporation and biofilm accumulation.
Basements
Basement floor drains are among the most overlooked and most common drain fly sources. Many basements have a floor drain that rarely, if ever, receives water. Over time, the P-trap water evaporates, the pipe walls develop biofilm, and the open connection to the sewer system allows drain flies to establish a breeding colony. Utility sinks in basements that are used only occasionally face the same issue.
Garages
Some garages have floor drains, particularly in older homes or homes in regions with cold winters where garage drains help manage snowmelt. These drains are almost never maintained and frequently lose their P-trap water seal. Oil, dirt, and organic debris that wash into the drain provide a food source for biofilm.
Guest bathrooms and vacation homes
Any bathroom that goes unused for extended periods is a prime candidate for drain flies. Guest bathrooms in primary residences and all plumbing fixtures in vacation homes or seasonal properties are at high risk. The fix is simple: run water through every drain for 30 seconds at least once per week (or once before each visit for vacation properties) to keep the P-trap filled and flush away early-stage biofilm.
For help identifying which pest you are dealing with, try our pest identifier tool.
How Do You Prevent Drain Flies?
Preventing drain flies is straightforward once you understand that they depend entirely on biofilm inside drains. A few simple maintenance habits keep biofilm from accumulating to levels that support breeding.
Run water through every drain weekly
The single most effective prevention measure is running water through every drain in your home at least once per week. This includes guest bathroom sinks and showers, basement floor drains, laundry room drains, and any other fixture that does not receive daily use. Running the faucet for 15 to 30 seconds is enough to flush the P-trap, refresh the water seal, and prevent stagnation. For vacation homes and seasonal properties, run all fixtures for a full minute when you arrive before each visit.
Clean drain stoppers and strainers monthly
Remove bathroom sink pop-up stoppers, shower drain strainers, and bathtub drain screens once per month. Wipe off the accumulated hair, soap scum, and residue. These components sit right at the entry to the drain and are the first place biofilm accumulates. A monthly cleaning takes two minutes per drain and significantly reduces the organic material entering the pipe.
Apply bacterial drain gel monthly
After resolving an active infestation, a monthly preventive dose of bacterial drain gel in each drain keeps biofilm in check. Apply the gel in the evening and avoid running water for several hours. This is the same product used for treatment, just applied at a lower frequency. One bottle of drain gel typically lasts three to four months of monthly preventive use across all household drains.
Address slow drains promptly
A slow-draining sink or shower is an early indicator of internal buildup. Address slow drains as soon as you notice them rather than waiting until they become fully clogged. Removing hair from the strainer, brushing the drain, and applying bacterial gel usually restores full flow and prevents the conditions that attract drain flies.
Clean the garbage disposal regularly
Run the garbage disposal with plenty of cold water for at least 15 seconds after each use to flush food particles through the system. Once per week, clean the splash guard by lifting each flap and wiping the underside with a scrub brush and dish soap. Once per month, fill the sink with two inches of warm water and dish soap, then remove the stopper and run the disposal while the soapy water flushes through. This cleans the disposal chamber and the connecting drain pipe.
Seal the overflow hole
The overflow hole in bathroom sinks is a common overlooked breeding site. You can clean it by inserting a small bottle brush and scrubbing, or by pouring a small amount of bacterial drain gel into the opening. Some homeowners use a funnel or squeeze bottle to direct the gel into the overflow hole. Adding this to your monthly drain maintenance routine eliminates a sneaky potential breeding source.
For more information on how to get rid of related small fly species, see our guides on how to get rid of gnats and how to get rid of fruit flies.
Want a professional to inspect your drains? Call (866) 821-0263 for a free estimate from a licensed pest control provider near you.
Get a Free Quote: (866) 821-0263Frequently Asked Questions
Talk to a Pest Control Expert
Get a cost estimate and connect with a licensed local exterminator.
No obligation. Licensed and insured professionals.