Short answer
Drain flies are small, fuzzy, moth-like flies that breed in the slimy film inside drains. To get rid of drain flies, find the drain they come from, scrub out the film and clean the trap, then keep the drain clean. Extension services say removing the breeding material works best. Do not pour insecticide down a drain.
A few tiny flies around the bathroom sink at night is the classic sign. This guide, written for homeowners with a note for Canadian readers, explains how to tell drain flies from fruit flies, how to find the source, the steps that work, what to avoid, and when the cause may be a plumbing or sewer problem.
Drain flies vs fruit flies: how to tell them apart
The fix differs, so identify the fly first. University of Maryland Extension describes both, and Virginia Tech Cooperative Extension describes drain flies.
| Check | Drain flies | Fruit flies |
|---|---|---|
| Look | Fuzzy, moth-like, pale brownish-gray to black. Wings held roof-like over the body (Virginia Tech) | Dull tan to brownish yellow or brownish-black, with eyes that are usually bright red |
| Size | About 1/16 to 1/4 inch (Maryland); 2 to 3 mm (Virginia Tech) | About 1/8 inch |
| Where you see them | Rooms with drains: kitchens, bathrooms, basements near floor drains. Often on tubs and showers by day | Mostly the kitchen, around ripe or fermenting food |
| What they breed in | The gelatinous film in drains and traps | Overripe fruit, vegetables and fermenting foods; also wine, beer, juice and vinegar |
University of Wisconsin Extension adds a third lookalike, the fungus gnat. Its larvae usually develop in the soil of houseplants, and the adults are not fuzzy like drain flies. If the tiny flies hover around a potted plant and not a drain, a drain cleaner will not help. Let the soil dry out somewhat between waterings, as Wisconsin Extension suggests.
If you cannot tell, Wisconsin Extension suggests bringing a sample to your local extension office.
Why drain flies breed in your drain
Drain flies lay eggs in the sludgy organic material on the sides of drains and overflow pipes, according to Virginia Tech. University of Maryland Extension says the larvae live in the gelatinous film in drains and traps and feed on algae, bacteria and fungi in it. Ohio State University Extension adds that the larvae develop in polluted shallow water or very moist organic solids.
That film is the real problem. The adults are only the part you see.
Likely spots include seldom-used sinks, tubs, toilets and floor drains (Virginia Tech), sink and tub overflow openings (Wisconsin Extension calls them a very common larval area), the drip pans of dishwashers, refrigerators, air conditioners and dehumidifiers (Virginia Tech), dirty garbage cans and saucers under potted plants (Maryland), and wet lint under a washing machine (Ohio State).
Drain flies do not bite and do not damage indoor plumbing, per Virginia Tech. Virginia Tech describes them as weak, erratic fliers that usually travel only a few feet at a time. Maryland Extension puts development from egg to adult at 7 to 28 days, and Ohio State says adults live about two weeks. A drain can keep producing flies for as long as the film is there.
Find the source before you treat
Several drains in a room can look equally suspect. Virginia Tech gives two cheap ways to find the one that is producing flies.
- Tape test. Put a piece of clear tape, sticky side down, over the drain opening and leave it overnight.
- Cup test. Coat the inside of a clear plastic cup with a thin film of vegetable oil or petroleum jelly, turn it upside down over the drain and leave it overnight.
Flies stuck to the tape or inside the cup in the morning mean that drain needs cleaning. Test every drain and overflow in the room, including rarely used ones, and check the other damp spots above.
How to get rid of drain flies: steps that work
The extension pages agree on the order: clean first, then maintain. Killing adult flies does not remove the source.
- Scrub the drain opening. Use a stiff brush to remove slime and sludge from the drain mouth and as far down as you can reach (Virginia Tech). Wear gloves.
- Clean the trap if the buildup is thick. For severe clogs, Virginia Tech says to remove and clean the plumbing trap. Ohio State suggests a long-handled stiff brush or a brush-tip snake to clear gelatinous material from the pipe.
- Deal with hair and soap. Virginia Tech says hair and soap clogs in showers may need a plumber's snake. Our drain snake guide and guide to cleaning a shower, sink or tub drain cover that step by step.
- Clean overflow openings and seldom-used drains. Wisconsin Extension recommends running hot water through seldom-used pipes at regular intervals, and into sink overflow drains.
- Consider a product made for the job. Ohio State suggests an enzyme-action drain cleaner designed to break down the sticky bacterial and algae film, and Maryland Extension says to clean traps and drains mechanically or with an over-the-counter drain cleaner, followed by hot water. If you try a product, use only that one and follow its label. See enzyme drain cleaners: do they work for what they can and cannot do.
- Repeat the check. Put the tape or cup back for another night. Ohio State notes that persistent effort is often needed.
Why a one-time pour rarely fixes it
Virginia Tech says hot water gives only short-term control by killing larvae on the surface, and that thick buildup still needs physical cleaning with a stiff brush. It also notes that larvae are hard to drown, because they trap air and can stay submerged for a day or more. Ohio State says bleach does not seem to clean the scum from pipes and that larvae are surprisingly resistant to it.
So the results come from scrubbing the film out, then keeping drains in use or flushed so it does not rebuild.
What to avoid
- Insecticide in drains. Virginia Tech says never to pour insecticides down a drain. Ohio State says no insecticides are registered for use in drains or sewage systems, and that doing so can damage sewer systems.
- Mixing products. Never mix cleaners. Ohio State warns that a caustic drain cleaner must never be followed with bleach, because chlorine gas can be released if the two mix in the drain line. Virginia Tech says under no circumstances to use ammonia together with bleach. Use one product at a time and follow the label.
- Sprays, bombs and traps as the fix. Ohio State says aerosol "flying insect" products only knock down adults. Fly paper strips and UV-light traps catch some adults but will not eliminate an infestation, per Virginia Tech and Ohio State.
For "drain cleaner for gnats," the useful answer is that the cleaner is only part of the job. Whatever product you choose, the brush and the trap clean-out do the real work. If someone swallows a drain cleaner or it gets on skin or in eyes, call 1-800-222-1222 in the US (poison.org).
Septic caveat
If your home has a septic tank, take extra care with chemicals. Ohio State lists septic tanks among drain fly breeding sites. The University of Nebraska-Lincoln extension says to use boiling water or a drain snake to open clogged drains instead of chemicals, because chemicals can kill the organisms in the tank, and EPA advises avoiding chemical drain openers for a clogged drain. See septic tank additives and treatments for more.
If you see wet ground, odors or standing wastewater in the yard, call a septic professional and your county health department.
When a plumbing or sewer problem may be behind it
Virginia Tech says the appearance of drain flies usually means a slow or clogged drain that needs cleaning. Maryland Extension lists sewer leaks and backups among other breeding sites. Call a licensed plumber if you notice any of these:
- Flies keep returning after you have cleaned every drain and overflow you can reach.
- Several drains are slow or gurgle, or a basement floor drain smells of sewage.
- Wastewater comes up in the lowest drain in the house. Stop using water and keep children and pets away from it.
Our clogged drain DIY or call a plumber guide shows where to stop, and drain cleaning near me explains how to find and vet a company. For what the visit may cost, see drain cleaning cost. If you smell gas, leave the building and call your gas utility from outside.
What to look up where you live
- Your state cooperative extension office: for identification help and local pest advice.
- County health department or environmental health office: for sewage backups, standing wastewater and septic systems.
- State or provincial plumbing licensing board: to check a plumber's license before a sewer job.
Rules differ by place. Check the current rules for your state or county. For Canadian readers: plumbing is regulated by each province or territory, product labels and rules differ, and quotes are in Canadian dollars. A provincial agriculture or university extension office can help with identification.
For plumbing and drain company owners
"Drain flies" is a search your customers make before they decide a drain needs a professional, and the companies they find first get the call. If you want to be one of them, read drain cleaning marketing and plumber Google Business Profile. You can also book a call with LiveLeadsLane. LiveLeadsLane is a marketing practice for contractors, not a directory, and it does not take jobs or refer homeowners.