How to Get Rid of Bathroom Flies Permanently

Bathroom flies are almost always drain flies, small moth-like insects that breed in the slimy organic buildup inside your pipes. Getting rid of them comes down to one thing: removing the gunk where their larvae live. No spray, bleach, or vinegar will solve the problem on its own. You need to physically clean the breeding site and keep it clean for at least three weeks to break their life cycle.

Identify What You’re Dealing With

The most common bathroom fly is the drain fly, a fuzzy, gray or tan insect about the size of a fruit fly with broad, leaf-shaped wings. They’re weak fliers and tend to hop along walls or rest near drains. If the tiny flies in your bathroom look more like fruit flies and run across surfaces in quick, jerky bursts rather than flying, you may have phorid flies (also called humpback flies), which breed in the same type of organic muck but can also come from leaky pipes, dirty mop heads, or decaying material under floors.

If you’re seeing actual fruit flies, they’re more likely gathering around trash cans, toothbrush cups, or anything with sugary residue. The fix for drain flies and phorid flies is largely the same: eliminate the moist, decaying organic matter they reproduce in.

Find the Breeding Drain

Before you start scrubbing, confirm which drain is the source. Place a piece of clear tape, sticky side down, over each suspect drain at night. Leave it until morning. Any adults emerging from the pipe will get stuck to the tape. Do this for several consecutive nights, because not every fly emerges on the same schedule.

Check every drain in the bathroom: sink, shower, tub, and floor drains. A population can breed in more than one spot at the same time. If no flies appear on any tape after several nights, the source may not be a drain at all, and you’ll need to investigate further (more on that below).

Clean the Drain Mechanically

This is the step that actually works. Drain flies lay clusters of 15 to 40 eggs on the wet, slimy film that coats the inside of pipes. The larvae hatch in less than two days and spend the next nine to 15 days feeding on that biofilm before pupating and emerging as adults. The entire cycle takes about 21 to 27 days. To stop it, you have to destroy the film they live in.

Use a stiff drain brush (a long, narrow bottle brush works) to physically scrub the inside walls of the drain as deep as you can reach. This removes the accessible biofilm and kills larvae embedded in it. Follow up by flushing with hot water. If you can’t reach deep enough with a brush, a foaming drain cleaner designed to cling to pipe walls can help dissolve buildup further down the line.

Repeat this cleaning every few days for at least three full weeks. That duration matters because it covers the entire life cycle. If you stop after one cleaning, surviving larvae deeper in the pipe will mature, lay new eggs, and restart the infestation.

Why Bleach, Vinegar, and Boiling Water Fall Short

Pouring bleach down a drain kills adult flies on contact, but it doesn’t penetrate the biofilm where larvae are embedded. Biofilm has a protective structure that resists chemical penetration, so the larvae survive and new adults emerge within days. The Alabama Cooperative Extension System specifically notes that pouring baking soda, bleach, vinegar, or boiling water down the drain is ineffective and can damage pipes. Boiling water in particular can warp PVC connections.

Enzyme-based drain cleaners are a better option than bleach because they’re designed to break down organic matter, but they work slowly, require repeated application, and rarely eliminate biofilm along the full length of a pipe from a single pour. They can supplement mechanical cleaning but shouldn’t replace it.

One combination you should never try: bleach and ammonia together. The chemical reaction produces hazardous gas. And insecticides should never be poured down a drain.

Trap the Adults While You Clean

Cleaning the drain stops new flies from being born, but adults already living in your bathroom can survive up to seven days. Trapping them speeds things up and makes your bathroom less miserable in the meantime.

A simple, effective trap: take a mason jar, punch a few tiny holes in the metal lid with a nail, and fill it with a quarter cup of apple cider vinegar plus a few drops of liquid dish soap. The vinegar attracts the flies, and the soap breaks the surface tension so they sink and drown. In side-by-side testing, this jar-with-holes method outperformed paper cone traps, plastic wrap traps, and open containers by a wide margin, catching 50 or more flies in a week.

You can also coat the inside of a clear glass or plastic cup with petroleum jelly and place it upside down over the drain overnight. This catches flies as they emerge and doubles as a monitoring tool to check whether your cleaning efforts are working.

When the Problem Is Bigger Than a Dirty Drain

If you’ve scrubbed every drain for weeks and the flies keep coming, the breeding site is likely somewhere you can’t see. Broken sewer pipes beneath floors, leaky shower pans, and cracked pipe connections inside walls are all common culprits. Moisture seeps into surrounding soil or building materials, creating a perfect breeding ground that no amount of drain brushing will reach.

The telltale signs: your tape test over the drains catches nothing, yet you’re still seeing dozens of flies daily. You find dead flies accumulating along baseboards, around HVAC vents, or behind outlet covers. The soil or space around a bathtub’s P-trap is visibly wet. In one well-documented case, a homeowner sealed gaps around baseboards and duct openings with painter’s tape and saw a 90% drop in flies, confirming they were entering from wall cavities rather than drains. The cause turned out to be heavily damaged plumbing under the basement floor.

If you suspect a broken pipe or subsurface leak, a plumber with a camera scope can inspect your drain lines without tearing up floors. This type of structural issue won’t resolve with DIY methods.

Preventing Them From Coming Back

Drain flies return whenever organic buildup returns, so prevention is really just ongoing maintenance. Clean bathroom drains every one to two weeks using a brush or a foaming pipe cleaner. Pay special attention to shower drains, which collect hair and soap residue quickly.

Reduce moisture wherever possible. Fix dripping faucets and leaky pipe connections promptly. Run water through infrequently used drains (like a guest bathroom floor drain) at least once a week to keep the P-trap full, which blocks flies from traveling up the pipe. If your bathroom stays humid, improving ventilation with an exhaust fan helps make the environment less hospitable.

For persistent or large-scale problems, professional high-pressure drain cleaning services can scour biofilm through the entire length of a pipe, reaching areas a hand brush never will. This is especially useful for older homes with long, corroded drain lines where buildup accumulates fast.