How to Get Rid of Fruit Flies in Bathroom

Fruit flies in bathroom spaces make no immediate sense. There’s no fruit in there. So where are they coming from?

Fruit flies in the bathroom are almost always coming from the drain. Bathroom drains accumulate a slimy film of hair, soap scum, skin cells, and toothpaste residue – exactly the kind of organic matter that fruit flies (and drain flies, which look nearly identical and are often mistaken for them) breed in. The bathroom is warm, moist, and has standing water in the drain trap at all times. From a fly’s perspective, it’s ideal real estate.

This means most kitchen solutions won’t help here. Covering the fruit bowl, tossing the bananas, keeping counters clean – none of that addresses a bathroom infestation. (If flies are also appearing in your kitchen, see fruit flies in kitchen for that specific battle.) The source is underground, inside a pipe you can’t see. You need to clean the drain. Do that first, and the problem usually resolves within a week without you needing to buy any special products.

1. Clean Drain with Snake or Brush

This is the most effective single step for bathroom flies, and most people skip it because it’s unpleasant. That’s why their infestations keep coming back.

The slimy organic film inside your drain pipe isn’t just at the surface. It coats the pipe walls several inches down, and larvae live inside that film, protected from anything that just flows through. You need to physically remove it. Pouring things down the drain – bleach, boiling water, vinegar – treats the exposed surface but leaves the biofilm largely intact.

Run warm water down the drain for 30 seconds first to soften the buildup. Then insert a drain snake or long-handled pipe brush and use a steady up-and-down motion to scrape the walls. You’ll feel resistance as you work through the slime layer. Pull it out, rinse the brush, and repeat until it comes back cleaner.

A plunger can help pull out stubborn clumps after you’ve loosened them. For shower drains with a removable cover, take the cover off first and get the brush as far down as it’ll reach – usually 12-18 inches is enough to clear the P-trap where most of the biofilm accumulates.

Do this on day one, then repeat on day three. Most of the larvae will be gone by then. Follow up with boiling water (next method) immediately after.

Cleaning bathroom drain biofilm with a drain brush to eliminate fruit fly breeding site

2. Boiling Water Down Drains

After physically scrubbing the drain, boiling water kills any remaining eggs and larvae in the trap and upper pipe walls. It’s also the right maintenance habit once the infestation clears.

Pour a full kettle of boiling water down the drain. Follow it immediately with half a cup (120 ml) of baking soda, then half a cup (120 ml) of white vinegar. The fizzing reaction is doing actual work here – the alkaline baking soda and the acid react and produce a foam that mechanically scrubs residual organic material off the pipe walls. Let it sit for 5-10 minutes, then flush with another full kettle of boiling water.

Do this twice a day for three days after the initial scrub. Then drop to once a week as maintenance. It takes about five minutes total and costs nothing beyond a box of baking soda.

Bleach is not a substitute. It’s a myth that bleach clears drain fly infestations – bleach flows through too fast to coat the pipe walls, so it makes contact with only a fraction of the biofilm. The boiling water plus baking soda/vinegar combo is slower, more thorough, and cheaper.

One thing to know: this method doesn’t work well if your drain runs directly to a P-trap with standing water (the water in the trap absorbs the heat before it reaches the biofilm). That’s why the physical scrub comes first – the brush gets where the water can’t.

3. Enzyme Drain Cleaner

If you’d rather not fish around in your drain with a brush, enzyme cleaners are the lower-effort alternative. They use biological agents to digest the organic residue rather than you scraping it out manually.

Pour the cleaner down the drain and let it sit for the time specified on the label – usually at least 8 hours, or overnight. The enzymes break down grease, hair, soap scum, and food particles that form the biofilm. Because they’re biological rather than chemical, they don’t damage pipes or septic systems, and they coat the pipe walls in a way that slows future buildup.

The catch: enzyme cleaners work slowly, and one application isn’t enough for a heavy infestation. Plan to repeat weekly for 3-4 weeks. They’re most effective as a follow-up to the drain brush – after you’ve removed the bulk of the biofilm mechanically, an enzyme treatment reaches the thin residue left behind that a brush can’t fully dislodge.

Products like Bio-Clean, Green Gobbler, or the generic enzyme drain cleaners at hardware stores all work. Check the label for dwell time – cheaper products sometimes specify only 30 minutes, which isn’t enough for a serious infestation. Look for products that recommend an overnight soak.

If you’re choosing between an enzyme cleaner and chemical drain cleaners (like Drano), go with the enzyme product for this specific problem. Chemical cleaners are designed to break up hair clogs, not digest biofilm. They also strip the beneficial bacterial layer that helps naturally slow buildup over time, and they’re harsher on older pipes.

4. Apple Cider Vinegar Traps

While you’re fixing the drain source, run ACV traps to knock down the adult population flying around the bathroom. This doesn’t fix the infestation on its own, but it reduces the number of adults that can lay new eggs while you’re working on the drain.

Pour about 2 fl oz (60 ml) of apple cider vinegar into a small bowl or glass. Add 2-3 drops of dish soap and stir lightly. The vinegar attracts the flies; the soap breaks the surface tension so they sink and drown instead of landing and flying off. Set traps near the drain and anywhere you see the most activity. Refresh daily – the soap dissipates and after 24 hours it stops working properly.

White vinegar doesn’t work nearly as well. Fruit flies respond to the fermented smell of apple cider vinegar specifically – the fermentation compounds are the actual attractant, not just the acidity. Red wine works too if you have it open and going to waste – it’s the same fermentation scent they’re tracking.

If the traps aren’t catching anything after 24-48 hours, you may be dealing with drain flies rather than fruit flies. Drain flies are slightly larger, have a fuzzy or moth-like appearance, and aren’t attracted to ACV. They look similar at a glance, which is why bathroom "fruit fly" infestations are often drain flies. Either way, the drain cleaning methods above handle both species – the adults are different but they’re breeding in the same place.

5. Fix Leaking Pipes and Drains

A clean drain won’t stay clean if there’s a slow leak feeding persistent moisture into the cabinet below. Even a drip at a compression fitting keeps a localised zone damp enough to encourage organic buildup and fly activity.

Check under the sink, around the toilet base, and along any exposed pipe. Don’t just look for puddles – feel for dampness on the cabinet floor, on the pipes themselves, and around the pipe joints where they connect to the wall. Cold water pipes that sweat are just as problematic as active leaks: that condensation is a continuous moisture source. Wrap them with closed-cell foam pipe insulation and it stops.

Look at the drain collar where the drain meets the bathroom floor too. A loose or improperly sealed drain collar can wick moisture into the surrounding material and create a secondary breeding zone you’d never find just by cleaning the drain.

Tighten loose connections, replace worn washers, and apply plumber’s putty or silicone sealant where there’s a gap. None of this requires a plumber unless you find actual pipe damage. But a leaking pipe will undo everything else here – the moment you restore the moisture gradient, the flies come back.

6. Install Drain Covers

Once the infestation is cleared, drain covers prevent it from coming back. This is purely preventive – installing a drain cover on an active infestation doesn’t do anything useful.

Mesh strainers and hair catchers block the debris that forms the biofilm before it reaches the pipe walls. Put them over shower drains and bathroom sink drains. Clean them out every few days so the caught debris doesn’t accumulate and become its own attraction point.

The $3-6 silicone hair catchers sold at hardware stores work well for shower drains. For sink drains, a simple mesh strainer that sits in the drain opening is enough. Neither requires any installation – they just sit in place. The only maintenance is clearing the caught debris every few days so it doesn’t become its own food source sitting right at the drain entrance. Takes about ten seconds.


FAQ

What causes fruit flies in the bathroom?

Drain biofilm is the primary culprit – the organic buildup of hair, soap scum, and skin cells inside drain pipes creates a warm, protected breeding ground with constant moisture. Secondary causes include trash cans with organic waste (even empty toothpaste tubes or used cotton swabs can attract them), moisture from pipe leaks under the sink, and wet mops or cleaning rags left on the floor for extended periods.

Does pouring bleach down the drain get rid of fruit flies?

No. Bleach flows through the pipe too fast to coat the walls where the biofilm sits. It makes contact with only the exposed drain surface and misses the larvae living deeper in the pipe. Boiling water with baking soda and vinegar is more effective because the fizzing action clings to the pipe walls. Enzyme drain cleaners are better still for ongoing treatment.

How long does it take to get rid of fruit flies in the bathroom?

With consistent drain cleaning starting on day one, most infestations clear within 5-7 days. Adult flies live 3-4 days, so once you cut off the breeding source, the population dies off without replacement. If you’re still seeing flies after 10 days of daily drain treatment, check for a secondary source – a trash can with organic waste, wet cleaning supplies stored in the cabinet, or a hidden moisture leak.

Are the flies in my bathroom fruit flies or drain flies?

Probably drain flies. Bathroom infestations are drain flies at least as often as they are true fruit flies, and the two look nearly identical at a glance. Drain flies are slightly larger, have a fuzzy or moth-like appearance when examined closely, and tend to rest on walls rather than hovering. Fruit flies are smaller and more agile. The practical difference: ACV traps only attract fruit flies. If your traps stay empty, you’ve got drain flies. Either way, cleaning the drain solves the problem for both.