Sewer Gnats: How to Find the Source and Get Rid of Them

Sewer Gnats: How to Find the Source and Get Rid of Them

If you are asking how do I get rid of sewer gnats, the answer is to stop treating the flies and start treating the drain. Find the drain they breed in, scrub the slimy film off its walls, and treat it weekly for three to four weeks. Then keep every drain in the house clean and wet. The adults you see are only a small part of the problem.

You have probably tried bleach, boiling water, or a can of spray already. The gnats disappeared for a day or two, then came back and clustered on the bathroom wall again. That is not bad luck. Sewer gnats, also called drain gnats or drain flies, lay their eggs in the film of grease, soap scum, and hair inside the pipe. Nothing you pour down the drain stays there long enough to matter, and a new generation can be ready within one to three weeks.

This guide explains why drain gnats in the house keep returning. Then it walks you through four steps: finding the source drain, scrubbing it, treating it on a schedule, and trapping the stragglers while you prevent a repeat. You get a four-week plan, a troubleshooting table, and clear signs that it is time to call a plumber.

Why sewer gnats keep coming back

Sewer gnats keep coming back because they breed in the biofilm lining your pipes, and most quick fixes never reach it. Knowing that one fact tells you where to aim every step that follows.

What sewer gnats are and where they come from

Sewer gnats are small, fuzzy flies about 1.5 to 5 mm long that breed in the gunk coating the inside of drains. Entomologists call them drain flies or moth flies. The cause is nearly always a drain with organic buildup and standing moisture. That might be grease and food residue in a kitchen sink, hair and soap scum in a shower, or a guest bath where the trap water sits for weeks. A sewer line that burps or backs up can also bring them in.

They are weak fliers and rarely leave the room where they hatched. If you only see them in one bathroom, the source is a drain in that bathroom, not an open window. Before you treat anything, make sure you are dealing with the right insect.

InsectWhat it looks likeWhere you find it
Sewer or drain gnatFuzzy, gray to dark brown, moth-shaped, wings fold like a roofWalls and ceilings near sinks, tubs, and floor drains
Fruit flyTan body, red eyesRipe fruit and trash cans
Fungus gnatSlender, long legs, darkHouseplant soil

Why bleach, boiling water, and sprays fail

Every common fix either hits the adults or rinses past the breeding site, so none of them clears the problem alone. The larvae live inside a protective film on the pipe wall, and liquid poured from the top runs past it in seconds.

Cutaway of a drain pipe showing slimy film and larvae on the inner wall while liquid runs past.

MethodWhat it actually doesWhy the gnats return
BleachKills some adults and larvae it touchesRinses past the film; can corrode metal pipes
Boiling waterKills what it touches for a momentCools in the pipe and leaves the film in place
Baking soda and vinegarFoams brieflyAlmost no scrubbing and no contact time
Aerosol sprayKills flying adultsNever reaches eggs and larvae in the pipe

Never mix bleach with vinegar or ammonia, because the mixture releases toxic gas. If you have a septic tank, skip bleach altogether, since it kills the bacteria the tank relies on. Do not pour insecticide down a drain either. University extension guidance notes that no insecticide is registered for use in drains, and it can damage sewer or septic systems.

Sewer gnats breed in the film inside the pipe, so the cure is cleaning the pipe, not killing the flies.

How long sewer gnats take to go away

Eggs hatch in about 32 to 48 hours, and a gnat grows from egg to adult in 8 to 24 days. Adults live around two weeks. You will usually see fewer flies within a few days of cleaning the source, but eggs laid before you started can keep hatching.

That is why the plan below runs for three to four weeks. It is long enough to outlast one full life cycle, with a margin for the slowest eggs. If gnats are still appearing after four weeks of treating every drain, the source is somewhere you have not looked yet, and Step 4 covers where.

Step 1. Find the drain they come from

To find the source, tape clear packing tape over each suspect drain overnight and check which one catches gnats in the morning. It takes five minutes and keeps you from treating the wrong pipe.

Run the overnight tape test

Do this in the evening, after the drains have been dry for a while.

  1. Cover each suspect drain opening with a strip of clear packing tape. Leave a small gap at one edge so air can move.
  2. As an alternative, set a clear cup upside down over the drain, with its inside rim coated in vegetable oil or petroleum jelly.
  3. Leave it overnight and do not run water in that drain.
  4. In the morning, count the gnats stuck to the tape or cup. The drain with the most is your source.

Treat every other drain in that room as well, even if its tape came up clean. Several drains often breed gnats at the same time, and a drain that looks clean can still hold eggs.

Check the drains people forget

If the tape test catches nothing, the gnats may be coming from a less obvious spot. Check these before you assume the kitchen sink is the culprit:

  • Garbage disposal and the underside of its rubber splash guard
  • Bathroom sink overflow hole
  • Shower and tub drains in a rarely used guest bathroom
  • Basement or garage floor drain
  • Laundry standpipe and washing machine drain pan
  • Sump pit, refrigerator drip tray, and HVAC condensate line

A drain nobody has run in a month is a prime suspect, because its trap water may have evaporated and left an open path from the sewer.

The drain that catches the most gnats overnight is where you start, and every other drain in that room is next.

Step 2. Scrub the film out of the drain

Scrubbing is the step that actually removes the larvae’s food and habitat. Pull out the strainer or stopper, clear the hair and sludge, and brush the pipe walls as far down as you can reach. Do this before you use any cleaner, because a cleaner works far better on exposed film than on a thick layer of gunk.

Gather supplies and scrub

You need rubber gloves, a flexible drain brush or a stiff bottle brush, an old toothbrush, dish soap, and hot tap water. Then work through the drain in order:

Five-step process showing how to scrub a drain, from removing the strainer to flushing with hot water.

  1. Remove the stopper, strainer, or grate and wipe off the slime with a paper towel.
  2. Scrub the strainer and stopper in the sink with dish soap and the toothbrush.
  3. Push the brush down the tailpiece, the straight pipe between the drain opening and the U-bend, and twist it as you pull it out. Repeat until the brush comes up clean.
  4. Scrub the sink or tub overflow opening with the toothbrush. Film builds up there above the waterline, where a pour never reaches.
  5. Flush with a few minutes of hot tap water.

Hot tap water is enough. Boiling water adds little and can stress old PVC joints and cracked porcelain.

Handle floor drains and disposals separately

Floor drains collect more sludge than sink drains. Lift off the grate, scoop out the debris with a gloved hand, and brush down the walls of the drain body. If you can see standing water or black slime, scrub until the surface looks bare.

For a garbage disposal, switch it off at the wall switch first. Then scrub the underside of the rubber splash guard and the visible chamber with a brush and dish soap, since food residue collects there. Run cold water and the disposal briefly afterward to rinse it.

Scrubbing removes the larvae’s food and shelter, and no liquid pour can do that job for you.

Step 3. Treat the drain weekly for four weeks

After scrubbing, apply a drain-safe enzyme or bio-based cleaner at night, leave it for at least eight hours, and repeat once a week for three to four weeks. One treatment is never enough, because eggs already in the pipe keep hatching on their own schedule.

Pick a cleaner and apply it overnight

Look for an enzyme or bio-based drain cleaner made to break down organic buildup, and follow the dose on its label. These products dissolve the film instead of just disturbing it, and they are generally gentler on pipes and septic systems than bleach. A foaming product has an edge, because foam clings to the vertical pipe above the water line where a liquid runs straight past.

Pour it in right before bed, when nobody will use that drain for eight hours or more. Rinse with hot tap water in the morning. Do not follow it with bleach or any other chemical cleaner in the same drain.

Follow a four-week schedule

Here is the plan for a typical case, a guest bathroom with a sink, a shower, and a tub. That is three drains and four treatments each, so 12 pours in total.

DayWhat to do
Day 1, eveningRun the tape test on all three drains
Day 2, morningScrub all three drains, including the overflow
Day 2, nightTreatment 1 in every drain
Day 9Treatment 2
Day 16Treatment 3
Day 23Treatment 4, then repeat the tape test

A clean tape test on day 24 means the cycle is broken. If a drain still catches gnats, treat it for another two weeks and move on to the checks in Step 4.

One treatment never works; four weekly treatments outlast a full gnat life cycle.

Step 4. Trap the adults and stop a repeat

Trap the flying adults to reduce the nuisance, then keep your drains wet and clean so the gnats have nothing to return to. Trapping handles the flies already out of the pipe. Prevention handles the next batch.

Catch the gnats still flying

A simple vinegar trap works as a stopgap. Fill a small cup with about half a cup of apple cider vinegar, add a few drops of dish soap, and set it near the source drain. The soap breaks the surface tension so gnats sink instead of landing and flying off. Replace it every few days.

A cup of vinegar and soap beside a sticky trap strip and a sink drain.

Sticky traps placed on the wall near the drain also work. Neither one cures anything, because the adults you catch are already out of the pipe. They are useful for confirming that the number of flies is falling week by week.

Keep every drain wet and clean

Prevention comes down to a few habits that take under two minutes a week:

  • Run water in unused drains weekly for about 30 seconds. A dry trap lets sewer air and gnats into the house.
  • Treat high-use drains monthly with the same enzyme or bio-based cleaner.
  • Fix slow drains within a week. A slow drain means film and debris are building up.
  • Clean the garbage disposal monthly with dish soap and hot water.
  • Keep standing water out of basement floor drains and mop buckets.

When the gnats still come back

If gnats persist after four weeks of treating every drain, look for a hidden source. Here are the usual suspects.

SymptomLikely causeWhat to do
Gnats in a guest bathDried-out trapRun water for 30 seconds, then treat the drain
Gnats after a pipe repairFilm left in the parts that were not replacedScrub the strainer, tailpiece, and trap
Gnats with a sewer smellCracked or leaking sewer lineCall a plumber
Gnats near the laundry or refrigeratorStanding water in a drain pan or trayEmpty, scrub, and dry it
Gnats in a multi-unit buildingShared vent stack or a neighbor’s drainTreat your drains, then tell maintenance

Call a plumber if you smell sewer gas, see repeated backups, or suspect a leak under a slab. Some problems are a physical blockage, such as a hair mass or a collapsed pipe, and a drain cleaner will not clear them.

Gnats that survive a full four-week treatment point to a hidden source, not a failed method.

Keep your drains clear

Sewer gnats are a drain problem, not a fly problem. Find the source with the tape test, scrub the film out, treat on a four-week schedule, and trap the adults while you keep every drain clean and wet. Skip the bleach, boiling water, and sprays, because they only reach the flies you can already see.

Stick with the schedule even when the gnats seem to be gone. Most failures come from stopping after one treatment. If you want more help keeping the rest of your house in shape, read the pest control and cleaning guides on Home The Spruce.

Picture of Zain Ali

Zain Ali

I'm a home improvement expert with over 15 years of hands-on renovation and DIY experience. I specialize in breaking down complex projects from plumbing fixes to full remodels into simple, actionable advice anyone can follow. When I'm not writing, you'll find me restoring furniture or tackling my next weekend project.

Latest Post