Sewer gnats come from organic buildup in your drains—and you kill them by removing their food source
Sewer gnats (also called drain flies or filter flies) live in the slime layer that builds up inside your pipes. They lay eggs in that organic matter, and the larvae feed on it as they grow. You see the adults flying around your bathroom or kitchen sink because they're emerging from the drain to find mates. To get rid of them, you need to clean the inside of the pipe where they're breeding, not just spray the air where you see them flying.
The gnats themselves are small—about 1/8 inch long, tan or gray, with fuzzy wings. They move slowly compared to fruit flies. If you're seeing them near a drain, that drain is almost certainly where they're living. The good news: this is fixable without calling a plumber, and it usually takes a few days to a week of treatment.
Key Takeaways
- Sewer gnats breed in the organic slime layer inside your drain pipes, so killing adults with spray does not stop new ones from hatching.
- A combination of drain cleaning (boiling water, a drain brush, or enzyme cleaner) and a drain cover or trap seal removes both the breeding ground and the escape route.
- Boiling water poured slowly down the drain kills larvae and breaks up buildup; enzyme drain cleaners work overnight and are gentler on old pipes than chemical drain cleaners.
- If gnats return after two weeks, the problem is likely a crack in the pipe, a dry P-trap under the sink, or a clogged vent stack on your roof.
- Drain covers and overnight drain seals prevent gnats from emerging while you treat the pipe, and they stop new gnats from entering from the sewer line.
Clean the drain with boiling water or an enzyme cleaner
Start by pouring boiling water down the affected drain. Boil a kettle or pot of water, let it cool for 10 to 15 seconds (so it doesn't crack an old pipe), and pour it slowly down the drain in stages—pour, wait 30 seconds, pour again. The heat kills larvae and softens the buildup they live in. Do this once a day for three to five days. This alone often stops the gnats within a week.
If boiling water does not work or you want a stronger approach, use an enzyme drain cleaner (brands include Green Gobbler, Bio-Clean, or Earthworm). These products contain bacteria and enzymes that digest the organic matter in your pipes. Pour the product down the drain according to the label, usually in the evening, and let it sit overnight. Enzyme cleaners work slowly but do not damage pipes the way chemical drain cleaners can. Repeat every two to three days for up to two weeks if needed.
Do not use chemical drain cleaners like Drano or Liquid-Plumr for this problem. They kill the gnats but do not remove the buildup they breed in, so new gnats hatch from eggs that survived the chemical. They also damage older pipes and can create safety hazards if you need to call a plumber later.
Use a drain brush or plumbing snake to scrub the pipe
For faster results, physically remove the buildup. A drain brush (also called a pipe brush or drain cleaning brush) is a long, flexible rod with bristles that scrub the inside of the pipe as you push and pull it. You can buy one at any hardware store for $5 to $15. Push it down the drain as far as it will go, twist it, pull it back out, and repeat five to ten times. Rinse with hot water afterward.
A plumbing snake (or drain auger) works similarly but has a coiled wire instead of bristles. It is better for breaking up solid clogs, but a drain brush is usually enough for gnat buildup. If you have a snake at home, use it; if not, a brush is cheaper and easier to use for this job.
After brushing, pour boiling water down the drain to flush out the loosened material. You may see a lot of dark, slimy water come back up—that is the buildup leaving the pipe. This is normal and a sign the treatment is working.
Seal the drain overnight to trap emerging gnats
While you are treating the pipe, prevent gnats from flying out by covering the drain. The simplest method is a drain cover or drain strainer—a mesh screen that sits over the drain opening. It lets water through but traps gnats. You can leave it in place permanently. Cost is $3 to $10.
For overnight sealing, tape plastic wrap or a damp cloth over the drain opening with duct tape or painter's tape. Leave it on for 8 to 12 hours. Gnats that emerge during the night will be trapped under the seal and will die. Remove the seal in the morning, pour boiling water down the drain, and replace the seal for the next night. Repeat for three to five nights while you treat the pipe.
Do not use a drain plug or stopper—gnats can still escape around the edges. A tight seal (plastic wrap taped down) or a mesh cover works better.
Check the P-trap under the sink for drying
The P-trap is the U-shaped pipe under your sink. It holds standing water that acts as a seal, preventing sewer gas and gnats from coming up through the drain. If the sink has not been used in a few days or weeks, that water can evaporate, and gnats can climb up from the sewer line below.
Run water down the drain for 30 seconds to refill the P-trap. If you have a sink you do not use often (a guest bathroom, a basement sink, a laundry tub), run water down it once a week to keep the trap full. This is especially important if you see gnats coming from a drain you rarely use.
If the P-trap is leaking (you see water pooling under the sink), tighten the slip nuts (the large hexagonal fittings where the trap connects to the pipes) by hand or with a wrench. If tightening does not stop the leak, the rubber washers inside the nuts have worn out and need replacing—a $5 to $15 fix and a 10-minute job if you are comfortable with basic plumbing.
Look for cracks in the pipe or a blocked roof vent
If gnats return within two weeks after treatment, the problem is usually not the drain itself but something feeding gnats into it from outside. Check for two things:
Cracks or damage in the drain line. If the pipe under your sink or in your wall has a crack, gnats can enter from the sewer line or from soil around the pipe. You may see water pooling under the sink or smell sewer gas. This requires a plumber to diagnose and repair, usually by replacing the damaged section of pipe. Call a plumber if you suspect this.
A blocked vent stack. Your plumbing system has a vent pipe that runs up through your roof. It lets air into the drain system and lets sewer gas out. If it is blocked by leaves, debris, or a bird's nest, pressure builds up in the pipes, and gnats can breed more easily. You may also notice slow draining or a sulfur smell. If you are comfortable on a roof, look at the vent opening (a 2- to 4-inch pipe sticking up). If it is clearly blocked, clear it by hand or with a plumbing snake. If you are not comfortable on a roof, call a plumber.
Prevent gnats from returning
Once you have cleared the gnats, keep them from coming back by maintaining your drains. Pour boiling water down your kitchen and bathroom drains once a week. Use a drain cover or strainer to catch hair and food particles. If you have a garbage disposal, run it with cold water for 30 seconds after each use to flush debris down the line.
In the kitchen, do not pour grease or oil down the drain—it solidifies and creates the buildup gnats breed in. Wipe pans with a paper towel before washing them. In the bathroom, use a hair trap in the shower and tub drain. These straightforward habits keep the slimy layer from building up again.
If you see gnats again months later, repeat the boiling water or enzyme cleaner treatment. You do not need to call a professional unless the gnats keep returning after two treatments, or you suspect a cracked pipe or blocked vent.
Frequently Asked Questions
Can I use bleach to kill sewer gnats?
Bleach poured down the drain will kill adult gnats and some larvae, but it does not remove the organic buildup they breed in, so new gnats hatch from surviving eggs. Boiling water or enzyme cleaner is more effective because it removes the food source. If you use bleach, follow it with boiling water or enzyme treatment.
How long does it take to get rid of sewer gnats?
With daily boiling water treatment, most infestations clear within five to seven days. Enzyme cleaners take longer—usually one to two weeks—because they work gradually. If you use a drain brush plus boiling water, you may see results in two to three days. Gnats that return after two weeks suggest a pipe problem, not a treatment failure.
Why do I see gnats in one drain but not others?
Gnats breed where buildup is heaviest, which is usually the drain you use most. Kitchen sinks get grease and food particles; bathroom sinks get hair and soap scum. Treat the drain where you see the gnats. If you see them in multiple drains, treat all of them, or the problem will move to a different drain.
Do drain fly traps work?
Sticky traps or apple cider vinegar traps catch adult gnats flying in the air, which reduces the number you see. They do not stop the breeding cycle in the pipe. Use a trap to monitor progress while you treat the drain, but do not rely on it alone.
What if the gnats are coming from the toilet?
Gnats in the toilet usually mean the wax ring seal under the toilet is failing, or there is a crack in the drain line below. This is less common than gnats in sink drains. Pour boiling water into the toilet bowl (not the tank) once a day for three days. If gnats persist, call a plumber to inspect the seal and drain line.