A few tiny flies near the shower usually means hundreds more are about to hatch. Gnats in bathroom drains, under toilets, and around potted plants breed in wet organic slime you can’t see without a flashlight and patience. The good news: once you identify the exact species and find the breeding site, killing them off takes less than a week in most homes.
Part of our Bathroom Remodeling & Flooring guide — explore the full guide →
Drain Flies Versus Fruit Gnats
These get confused constantly, and the wrong diagnosis means weeks of failed treatments. Drain flies are fuzzy, dark gray, about 2mm long, and rest with their wings folded like a moth. They’re slow and easy to swat. Fruit gnats are shiny, hover more actively, and have clear wings held flat.
Drain flies breed exclusively in slime inside pipes. Fruit gnats breed in overripe produce, potting soil, or garbage. If you have them in a bathroom with no plants or food, you almost certainly have drain flies.
Finding the Source
Tape a clear plastic cup upside down over each drain in the bathroom overnight. Check in the morning. The drain with flies trapped inside the cup is the breeding site. Don’t assume it’s the one you see them flying near; flies often emerge from the tub drain and gather at the bathroom window six feet away.
Check these spots in order:
- Shower and tub drains (most common source)
- Sink overflow hole (the small hole near the top of the basin)
- Toilet base seal (if the wax ring is failing, sewage seeps under the flooring)
- Floor drain in basement bathrooms
Treating Drain Flies
Skip bleach. It smells aggressive but runs straight through the trap and leaves the slime intact. You need something that clings and digests organic matter.
- Pour a kettle of boiling water down the affected drain to loosen surface gunk.
- Follow with 1 cup of baking soda, then 1 cup of white vinegar. Let it foam for 15 minutes.
- Scrub the inside of the drain with a stiff nylon brush or a bottle brush taped to a coat hanger.
- Apply a bio-enzyme drain cleaner like Bio-Clean or Zep Drain Defense, following label directions. These products contain bacteria that eat the slime over several nights.
- Repeat the enzyme treatment for three consecutive nights.
You should see flies drop to near-zero within 5 to 7 days. Adults live about 20 days, so a few stragglers linger even after breeding stops.
Treating Fruit Gnats
Remove the food source first. Toss old produce, empty the trash, and check under the fridge and behind appliances for forgotten scraps. Set apple cider vinegar traps: half a cup of ACV with two drops of dish soap in a shallow bowl, covered with plastic wrap punched with fork holes. Flies get in, can’t climb out through the soap-broken surface tension.
Toilet Base Gnats (the Serious Case)
Flies emerging specifically from around the toilet base suggest a broken wax seal. Water and sewage leak into the subfloor, and drain flies breed in the contaminated material. You’ll need to pull the toilet, replace the wax ring (a $4 part), and in bad cases replace sections of rotted subfloor. Ignoring it damages the bathroom floor and draws more pests each month.
Preventing Them From Coming Back
Run hot water down every bathroom drain for 60 seconds, once a week. Pour a half cup of bio-enzyme cleaner into each drain monthly. Fix any slow drains immediately; standing water in the trap plus slow flow equals gnat paradise. Keep the bathroom exhaust fan running for 15 minutes after every shower so humidity drops below 50 percent.
When to Call a Plumber
If flies keep returning despite two rounds of treatment, the breeding site is likely deeper in the line than household products can reach. A plumber with a camera can scope the drain line for $150 to $250 and locate hidden buildup or a cracked pipe section.
Products Worth Buying
- Bio-Clean Drain Cleaner, 2 lb jar, about $35, lasts 2 years
- Zep Drain Defense gel, around $10
- Black bottle brush set from Home Depot, $8
- Amazon ACV fruit fly traps (if reusable traps appeal to you), about $15 for four
Combined, you’ll spend under $70 and solve the problem without calling an exterminator.
Common Treatment Mistakes
Homeowners waste weeks on approaches that feel productive but accomplish nothing. Pouring bleach down drains kills visible adults but leaves the biofilm intact; larvae keep hatching from deeper in the pipe. Commercial drain cleaners like Liquid-Plumr contain sodium hydroxide that eats pipes before it dents the slime. Fly strips catch adult gnats but do nothing to interrupt breeding. Leaving drains dry (stopping water use for a few days) actually makes things worse because the P-trap dries out and sewer gas carries more flies into the bathroom.
Seasonal Patterns
Gnats in bathroom drains peak in late summer and fall when indoor humidity climbs above 55 percent. Running a portable dehumidifier in the bathroom for a few hours after showers (set at 45 percent target) deprives adults of the moist conditions they need to mate and lay. A small Frigidaire 22-pint unit runs about $200 and pays back in reduced mold and pest pressure inside one season.
Pets and Children Safety
Bio-enzyme cleaners are non-toxic to mammals once they’re in the drain, but the concentrated formulations irritate eyes and skin during pouring. Wear gloves and keep pets out of the bathroom for 30 minutes after application. ACV vinegar traps are safe around toddlers but the fermenting smell attracts flies for days; place them on a high shelf where curious hands cannot knock them over. Avoid pyrethrin-based foggers in occupied bathrooms; they kill adults but require a 4-hour evacuation of the space.