Those small, worm-like creatures in your bathroom are almost certainly larvae from drain flies, tiny moths that breed inside the slimy buildup coating the inside of your pipes. Less commonly, they’re housefly maggots drawn to a hidden moisture source or decaying organic material. Either way, the fix starts with identifying where they’re coming from and cutting off their food supply.
What You’re Actually Looking At
The most common bathroom “maggot” is the larva of the drain fly, also called sewer flies, filter flies, or bathroom flies. The adults are tiny, fuzzy, moth-like insects you may have noticed resting on walls near your sink or shower. They belong to the fly family Psychodidae, and one species in particular is found in homes worldwide. The larvae are small, legless, and grayish, typically 4 to 10 mm long. They look like tiny worms and tend to cluster near drain openings or on wet surfaces.
True housefly maggots are also possible but less likely in a bathroom unless there’s a trash can with organic waste, a forgotten diaper pail, or something dead behind a wall. Housefly maggots are usually white, plumper, and more active. If you’re seeing them on the floor away from any drain, the source is probably not your plumbing.
Why Your Drains Are Breeding Grounds
The inside of a bathroom drain is a surprisingly rich ecosystem. Every time you wash your hands, shower, or brush your teeth, you send a mix of soap, skin cells, hair, toothpaste, and oils into the pipes. Over time, this accumulates into a thick, slimy layer called biofilm. That biofilm contains bacteria, fungi, algae, and enough nutrients to support a small food chain. Research on household drains has found not just bacteria but nematode worms, protozoa, and rotifers living inside this slime, all thriving on the constant supply of organic material.
Drain flies lay their eggs directly on this biofilm. A single female deposits 20 to 100 eggs at a time, and those eggs hatch in less than 48 hours. The larvae feed on the sludge coating the pipe walls, growing through several stages before pupating and emerging as adults. The entire cycle can repeat every two to three weeks under warm, moist conditions, which is why a small problem can escalate quickly.
Other Sources Besides Drains
If the larvae aren’t clustered near a drain, check these common spots:
- Bathroom trash cans. Feminine hygiene products, cotton swabs with organic residue, or loosely tied bags can attract flies.
- Leaky pipes. A slow leak under the sink or behind the wall creates persistent moisture that supports mold and organic buildup, both of which attract egg-laying flies.
- Damp bath mats or towels. Fabric left wet on the floor for days can develop enough organic growth to become a breeding site.
- A dead animal. If maggots appear suddenly and in large numbers with no obvious moisture or waste source, a rodent or bird may have died inside a wall void, ceiling space, or vent duct. Houseflies can find these quickly, and the maggots sometimes migrate to visible areas.
- Standing water. A toilet that’s rarely flushed, an unused shower stall, or a floor drain with a dried-out trap can all become breeding sites.
How to Find the Exact Drain
If you have multiple drains in your bathroom, you can narrow down which one is the source with a simple tape test. Before bed, place a strip of clear packing tape loosely over each drain opening, sticky side down. Don’t seal it completely since you want air to still flow through. Overnight, any adult flies emerging from the pipe will get stuck to the tape. Check each strip in the morning. The drain with flies on its tape is your culprit. You may need to repeat this for two or three consecutive nights, since not every fly emerges on the same schedule.
Getting Rid of Them
The core principle is simple: remove the biofilm, and you remove their habitat. Chemical sprays aimed at the adult flies won’t solve the problem because the larvae and eggs are safely embedded in the pipe sludge. You need to target the breeding site directly.
Mechanical Cleaning
The most effective first step is physically removing the buildup. Pull out any drain stoppers and clean them thoroughly. Use a stiff pipe brush or a drain snake to scrub the inner walls of the pipe as far down as you can reach. This disrupts the biofilm layer where eggs and larvae are attached. If you have a slow drain, clearing the clog is critical. Drain flies specifically lay eggs on the back side of clogs, so as long as that blockage stays, they have a place to breed.
Boiling Water
Pouring boiling or near-boiling water down the drain kills larvae and loosens biofilm. A single treatment will kill active larvae but often misses eggs embedded deeper in the sludge. For better results, pour a full kettle of boiling water down the affected drain twice a day for about a week. This repeated approach addresses newly hatching larvae before they can mature.
Enzymatic or Bacterial Drain Cleaners
Products containing enzymes or beneficial bacteria (like septic tank treatments) break down organic buildup over time. These are particularly useful because they eat away the biofilm itself rather than just killing what’s on the surface. Pest control professionals often use foaming enzymatic cleaners that expand to coat the full interior of the pipe, reaching areas that liquid poured from above would miss. One or two applications typically resolves the issue when the infestation is limited to a single drain.
Vinegar vs. Bleach
Vinegar (diluted or full strength) poured down drains can kill eggs effectively. Bleach is a common instinct, but it’s actually less reliable for this problem. Bleach slides over biofilm without fully penetrating it, and multiple sources in pest control suggest it doesn’t reliably destroy eggs. If you use bleach, expect to need daily treatments for at least two weeks before seeing results. Vinegar or enzymatic cleaners tend to work faster.
Are They Dangerous?
Drain fly larvae are considered nuisance pests, not a health threat. They don’t bite, sting, or transmit diseases in the way mosquitoes or ticks do. There is a condition called myiasis, where fly larvae infect human tissue, but this is associated with open wounds exposed to specific fly species in tropical environments. The CDC notes it primarily affects people with untreated wounds in tropical and subtropical areas. Standard drain fly larvae in a household bathroom are not a myiasis risk for healthy individuals.
That said, heavy infestations can signal broader plumbing issues like broken sewer lines or chronic leaks that are worth addressing for reasons beyond pest control.
Keeping Them From Coming Back
Once you’ve cleared the infestation, prevention comes down to disrupting the conditions that allowed it. Run water through every drain in your bathroom at least once a week, including floor drains and guest bathroom fixtures you rarely use. Stagnant water in a dry trap is an open invitation. Clean drain stoppers and strainers monthly, removing hair and soap buildup before it migrates deeper into the pipe.
Good ventilation matters too. Use your bathroom exhaust fan during and after showers to reduce humidity. Wipe down wet surfaces and hang bath mats to dry rather than leaving them flat on the floor. Keep your bathroom trash can lined, tied, and emptied regularly.
If you clean everything thoroughly and the larvae keep returning, the breeding site may be deeper in your plumbing than you can reach with household tools. A cracked sewer line, a broken pipe behind the wall, or a main line issue can create persistent moisture and organic buildup that no amount of boiling water will fix. At that point, a plumber with a camera scope can identify the problem faster than continued DIY attempts.

