Drain flies and fungus gnats are both tiny flying insects that show up indoors, but they come from completely different sources and require different fixes. Drain flies breed inside the slimy buildup coating your plumbing pipes, while fungus gnats come from overwatered houseplant soil. Telling them apart is the first step to actually solving the problem.
How to Tell Them Apart
Drain flies and fungus gnats look similar at a glance, since both are small, dark, and annoying. But once you know what to look for, the differences are obvious.
Drain flies (sometimes called moth flies) are fuzzy. Their wings and bodies are covered in tiny hairs, giving them a moth-like appearance. They hold their large, leaf-shaped wings flat over their bodies like a roof when at rest. They’re weak fliers and tend to make short, hopping flights rather than sustained buzzing. You’ll usually spot them sitting on bathroom walls or ceilings near sinks, showers, or floor drains.
Fungus gnats are slender and mosquito-like, with long legs, clear wings, and a dark body. They fly more actively than drain flies, often hovering around houseplants or circling near windows. If the tiny flies in your home are clustered around potted plants rather than bathrooms, you’re almost certainly looking at fungus gnats.
Where Each One Breeds
This is the most important distinction, because it tells you where to focus your efforts.
Drain flies lay their eggs in the bacterial scum and gelatinous film that builds up on the inside walls of drain pipes, overflow openings, and drain traps. Their larvae feed on this decaying organic matter, algae, and sediment. Any fixture with standing moisture and organic buildup can serve as a breeding ground: bathroom sinks, shower drains, floor drains, septic tanks, and even dirty garbage containers or rain barrels. If a drain isn’t used regularly, the stagnant film inside becomes an ideal nursery.
Fungus gnats breed in moist potting soil. The larvae live in the top layer of soil and feed on fungi, decaying plant material, and sometimes plant roots. Overwatering is the single biggest factor that creates the conditions they need. At 75°F, a generation of fungus gnats can go from egg to reproducing adult in about 17 days: eggs hatch in roughly 3 days, larvae develop over 10 days, and adults emerge after 4 more days as pupae. That fast cycle explains why a few gnats around a plant can turn into a swarm within weeks.
The Tape Test for Drain Flies
If you’re not sure whether your problem is drain flies, there’s a simple overnight test. Right before bed, dry off the area around each suspect drain. Place a strip of clear packing tape or a small glue board across the center of the drain opening, sticky side facing down. Don’t cover the drain completely, because the flies need an updraft to emerge from the pipe.
Leave the tape in place overnight. If you find small flies stuck to it in the morning, that drain is a confirmed breeding site. If the tape comes up clean, repeat the test for at least four more nights, since fly emergence varies with the breeding cycle. For fungus gnats, the test is simpler: look at your houseplants. Gently disturb the soil surface and see if tiny flies scatter.
Getting Rid of Drain Flies
The most common advice online is to pour boiling water, bleach, or vinegar down the drain. None of these actually solve the problem. Boiling water flushes loose debris but cools rapidly once it hits cold pipes, leaving the biofilm intact. Bleach kills surface bacteria but rinses out before it can penetrate the structured matrix of organic material clinging to pipe walls. The flies return within days because the breeding site is still there.
What works is physically removing the biofilm. Pull out the drain strainer or stopper and push a stiff bottle brush down the tailpiece as far as it reaches. Scrub the inside walls of the pipe and the overflow opening. Follow up with hot water to flush loosened material. Enzyme-based drain cleaners can help break down residual organic buildup, but they work best as a supplement to brushing, not a replacement. Once the biofilm is gone, the larvae have no food source and the population collapses.
For drains you don’t use often, running water through them weekly prevents the stagnant film from building up in the first place.
Getting Rid of Fungus Gnats
Since fungus gnats depend on moist soil, the most effective fix is letting your plants dry out between waterings. Allow the top inch or two of soil to become completely dry before watering again. This kills larvae and makes the soil inhospitable for egg-laying. Most houseplants tolerate this drying cycle without any harm.
Yellow sticky traps placed near the soil surface catch adult gnats and help you monitor whether the population is shrinking. Bottom-watering (filling the saucer and letting the plant absorb moisture from below) keeps the top layer of soil drier, which discourages females from laying eggs there. If a particular pot is heavily infested, repotting with fresh, well-draining soil can eliminate the larvae altogether.
A thin layer of sand or decorative gravel on top of the potting mix creates a barrier that dries quickly and prevents adults from reaching the soil to lay eggs.
Do Either One Pose Health Risks?
Neither drain flies nor fungus gnats bite. They’re nuisance pests, not dangerous ones. That said, drain flies can carry bacteria and other microorganisms from their breeding sites to food and kitchen surfaces, so an infestation in a kitchen drain is worth addressing promptly. Fungus gnats pose no direct risk to people, though their larvae can damage plant roots in severe infestations and may carry plant disease organisms between pots.
Quick Comparison
- Appearance: Drain flies are fuzzy, moth-like, with broad wings. Fungus gnats are slender, mosquito-like, with clear wings.
- Location: Drain flies cluster near drains, sinks, and showers. Fungus gnats hover around houseplants and windows.
- Breeding site: Drain flies breed in pipe biofilm. Fungus gnats breed in moist potting soil.
- Flight pattern: Drain flies make short, weak hops. Fungus gnats fly actively and hover.
- Fix: Drain flies require scrubbing pipe walls to remove biofilm. Fungus gnats require drying out your soil.
The core principle is the same for both: remove the moisture and organic material they need to reproduce, and the population dies off on its own. Sprays and traps reduce the adults you see, but only eliminating the breeding site stops new ones from emerging.