What Are Drain Flies Attracted To in Your Home?

Drain flies are attracted to moist, decaying organic matter and the slimy biofilm that builds up inside pipes and drains. They follow the odors of this decomposing material to find places to feed and lay their eggs. If you’re seeing these small, fuzzy, moth-like insects in your bathroom or kitchen, something in your plumbing is giving them exactly what they need.

Biofilm and Pipe Slime: The Main Attraction

The single biggest draw for drain flies is the gelatinous film that coats the inside of wet drainpipes. This slimy layer, sometimes called biofilm or bio slime, is a mix of bacteria, fungi, grease, soap residue, hair, food particles, and other organic debris that accumulates over time. It clings to the vertical walls of pipes and stays perpetually moist, creating a rich food source.

Female drain flies lay their eggs directly on this film, typically in clusters of 15 to 40 eggs at a time (though masses of up to 100 have been documented). Once hatched, the larvae feed on the decaying material, bacteria, fungi, and microscopic organisms living within the slime. The entire lifecycle from egg to adult takes roughly 21 to 27 days, and it speeds up in warmer temperatures. That means a single neglected drain can produce new generations of flies about every three weeks.

Moisture Is Non-Negotiable

Drain flies will not lay eggs on dry surfaces. They need conditions that are moist to nearly saturated. This is why they gravitate toward continuously wet environments: drains that see daily use, pipes with slow leaks, and any spot where water pools and organic matter collects. Even a thin film of standing water over decaying material is enough.

This moisture requirement separates drain flies from other small household flies. Fruit flies chase ripening or rotting fruit and sugary liquids. Fungus gnats hover around the wet soil of potted plants. Drain flies want the dark, damp interior of your plumbing and similar hidden wet spots.

Where They Breed Indoors

Any drain in your home that accumulates organic buildup can become a breeding site. The most common locations include:

  • Bathroom sink, shower, and bathtub drains, where hair, soap scum, and moisture create ideal conditions
  • Kitchen sink drains and garbage disposals, especially when food residue and grease build up
  • Laundry room drains, where lint and detergent residue collect
  • Overflow holes in sinks and bathtubs, which are hidden channels that trap moisture and organic matter
  • Toilet bases or tanks, particularly if there’s a slow leak or poor sanitation
  • Leaking pipes behind walls or under concrete slabs, where wet organic debris accumulates out of sight
  • Condensation drip pans under appliances like refrigerators or air conditioning units

Less obvious sources include wet mop heads left sitting in buckets, dirty garbage cans, and clogged gutters. Anywhere water sits long enough for organic material to decompose can attract them.

Outdoor Attractants

Drain flies don’t only live indoors. Outside, they breed in sewage filter beds, septic tank field lines, moist compost piles, and wastewater treatment facilities. They also lay eggs in the soil under leaking outdoor pipes, garbage containers, and rain barrels. Anywhere water collects and algae or organic matter grows is fair game, including saucers underneath potted plants.

If drain flies appear indoors but you can’t find an obvious drain source, a crack in your foundation or a gap around plumbing could be letting them migrate in from outdoor breeding sites near your home.

How to Find the Source

Because drain flies rest near their breeding site (you’ll often spot them sitting motionless on bathroom walls or ceilings), they usually point you in the right direction. But when you’re not sure which drain is the culprit, a simple trapping test works well.

Place a clear plastic cup or glass jar coated inside with petroleum jelly or vegetable oil over the suspected drain overnight. You can also tape a piece of clear adhesive tape, sticky side down, over the drain opening. If flies are breeding inside that pipe, newly emerged adults will get stuck as they try to exit. Test multiple drains at once and leave the traps for a few nights, since not every fly emerges on the same schedule.

Removing What Attracts Them

Killing adult drain flies without addressing the biofilm inside your pipes is pointless. New adults will keep emerging every few weeks. The goal is to destroy the organic layer where eggs and larvae live.

Start by physically cleaning the drain. A stiff pipe brush or drain brush pushed into the pipe and twisted will scrub away the slimy film clinging to the walls. This mechanical removal is the most effective first step because it physically dislodges the eggs and larvae along with their food source.

Follow up with an enzyme-based drain cleaner, which contains biological agents that break down the remaining organic residue. These thick gels are designed to cling to vertical pipe walls, continuing to digest the buildup over several hours. For stubborn infestations, applying the enzyme cleaner for three consecutive nights typically resolves the problem. Standard chemical drain cleaners (the kind that dissolve hair clogs) move through pipes too quickly to fully break down the biofilm and aren’t designed for pest control.

Once the breeding material is gone, regular maintenance prevents a return. Running water through infrequently used drains at least once a week keeps the trap full and flushes early buildup. Periodic brushing or enzyme treatments in problem drains, especially in warm months when the lifecycle accelerates, stops biofilm from reaching the thickness drain flies need to reproduce.

Drain Flies vs. Fruit Flies vs. Fungus Gnats

These three pests are easy to confuse, but their attractions are different enough that identification matters for getting rid of them. Drain flies are small, fuzzy, and hold their broad wings flat over their body like a moth. They rest on walls near drains and are weak, short-distance fliers. Fruit flies are slightly smaller (about an eighth of an inch), look like tiny house flies, and have distinctive red or dark eyes. They swarm around fruit bowls, trash cans, and recycling bins, drawn to sugary, fermenting material. Fungus gnats resemble tiny mosquitoes and hover in clouds above houseplant soil, where their larvae develop in the moist growing medium.

If the insects cluster near your sink but ignore the fruit on your counter, you’re dealing with drain flies. And the fix is in the pipes, not on the countertop.