Small flies in your house are almost certainly one of four species: fruit flies, drain flies, fungus gnats, or phorid flies. All four are under 1/8 inch (about 4 mm) long, but they breed in very different places, which means the fix depends entirely on which one you’re dealing with. Identifying the fly tells you where to look, and finding the breeding source is the only way to stop them for good.
Which Small Fly Do You Have?
The fastest way to narrow it down is to notice where the flies congregate and what they look like up close.
Fruit flies have a stout, rounded body with distinctive red eyes. You’ll spot them hovering around your kitchen counter, near fruit bowls, compost bins, or recycling containers. They’re tan or brownish-yellow and extremely fast fliers that seem to appear out of nowhere the moment produce starts to ripen.
Drain flies look fuzzy, almost moth-like, with broad leaf-shaped wings they hold flat over their bodies. They’re weak fliers and tend to rest on walls near bathrooms, laundry rooms, or kitchen sinks. You’ll often see them sitting still rather than buzzing around.
Fungus gnats are dark-bodied with long legs and look like tiny mosquitoes. They hover around houseplants and are attracted to light, so you’ll find them near windows or lamps. If you disturb the soil in a potted plant and a cloud of tiny flies rises up, those are fungus gnats.
Phorid flies are roughly the same size as fruit flies but have a distinctive humped back and tend to run rapidly across surfaces rather than immediately flying. They’re tan to dark brown or black, with noticeable dark veins along the front edge of their wings. Phorid flies are more common in commercial buildings, but when they show up in homes, they can signal a more serious problem.
Fruit Flies: The Kitchen Problem
Fruit flies are attracted to anything fermenting. Overripe bananas, a splash of wine left in a glass, a damp sponge with food residue, even the film inside an unwashed recycling bin. Adult females lay eggs directly on or near decaying organic material, and the larvae that hatch feed on that material. The second generation matures in about 10 days, so a single piece of forgotten fruit can spawn a significant infestation within two weeks.
To eliminate them, start by removing every possible food source. Refrigerate ripe fruit, empty and rinse recycling bins, clean under appliances, and wipe down counters. Any wet, organic residue is a potential breeding site. Adults are highly mobile and can locate even temporary food sources before they dry out, so thoroughness matters.
While you clean up breeding sources, traps help knock down the adult population. A simple DIY version works well: fill a jar with apple cider vinegar or a bit of old wine, cover it with plastic wrap, and poke small holes no bigger than 1/8 inch. Flies crawl in but can’t find their way out. Adding a small strip of flypaper inside the jar makes the trap even more effective. Commercial sprays containing pyrethrum will kill adult flies on contact, but they won’t touch eggs or larvae still developing in organic material. The trap-and-clean approach works better because it addresses both generations.
Drain Flies: The Pipe Problem
Drain flies breed in the gelatinous film of bacteria, grease, and organic matter that builds up inside pipes, especially in drains that aren’t used frequently. Guest bathroom sinks, basement floor drains, and shower stalls that sit idle for weeks are classic hotspots. The slimy coating inside the pipe is where females lay eggs, and the larvae live inside that film until they mature.
One of the most common pieces of advice you’ll find online is to pour bleach down the drain. It rarely works. Bleach flows past too quickly to penetrate the thick buildup where eggs and larvae are embedded. Drain fly larvae are surprisingly resistant to bleach, and full-strength bleach can corrode older pipes.
What does work is physically removing the film. The most effective approach is to pull out the drain trap and use a long-handled, stiff brush or a plumber’s snake with a brush tip to scrub the inside of the pipe. After scrubbing, flush the line with boiling water to clear any remaining material. Enzyme-based drain cleaners offer a less labor-intensive option. These products contain bacteria that digest the organic film drain flies feed on, and some formulations also break down eggs. They’re safe for plumbing and available online or at janitorial supply stores. For persistent infestations, foaming enzyme treatments applied by pest control professionals can reach buildup that liquid cleaners miss.
One important safety note: never mix a lye-based drain cleaner with bleach. If the two chemicals meet inside a drain line, they can release chlorine gas.
Fungus Gnats: The Houseplant Problem
If the flies are clustered around your potted plants, the issue is almost certainly fungus gnats. They thrive in warm, moist potting soil, and overwatering is the single biggest contributor. The larvae live in the top two inches of soil, feeding on fungi, algae, and organic matter in the potting mix.
The simplest first step is to let the soil dry out more between waterings. Fungus gnat larvae need consistently moist conditions to survive, and allowing the top layer to dry disrupts their lifecycle. Be careful not to overdo it to the point of stressing your plants, though.
For a more targeted approach, a naturally occurring soil bacterium called BTI (Bacillus thuringiensis israelensis) kills fungus gnat larvae without harming plants, pets, or people. It’s sold as “mosquito bits” or “mosquito dunks” at most garden centers. To use it, soak a dunk in warm (not boiling) water for about 12 hours to create a concentrated “tea,” then use that water on your plants. Top watering is more effective than bottom watering because the larvae concentrate in the top few centimeters of soil. If you do bottom water, leave the pot soaking long enough for moisture to reach the surface, then pour some of the BTI solution directly onto the top layer.
Yellow sticky traps placed near the soil surface catch adult gnats and help you monitor whether the population is declining. Used together with BTI and drier watering habits, most fungus gnat problems resolve within a few weeks.
Phorid Flies: The Warning Sign
Phorid flies are the one small fly that can point to a problem bigger than dirty dishes or overwatered plants. They breed in decaying organic matter and are strongly associated with moisture from plumbing failures. In homes, they often indicate a cracked or fractured drain line beneath the foundation, a leaking pipe inside a wall cavity, or sewage seeping into soil under a concrete slab.
Start by checking the obvious: areas around bathroom and kitchen plumbing, crawl spaces, and basements where moisture might be supporting fungal growth. If you can’t find a visible source and the flies keep coming, the problem may be hidden. Plumbing companies can examine drain lines using a flexible camera scope or by injecting smoke into the system. Smoke follows the same paths the adult flies use to enter the structure, escaping through foundation cracks or other openings and revealing exactly where the breach is. If a broken pipe under a concrete slab turns out to be the cause, the concrete will need to be opened to repair the pipe and remove contaminated soil.
Phorid fly infestations that don’t respond to surface-level cleaning are worth taking seriously. The flies themselves are a nuisance, but the underlying sewage leak or moisture problem can cause structural damage if left unaddressed.
Keeping Small Flies Out Long-Term
Once you’ve dealt with the immediate infestation, prevention comes down to removing the conditions these flies need to breed. Store ripe fruit in the refrigerator. Rinse bottles and cans before putting them in recycling. Take kitchen garbage out before it sits overnight in warm weather. Run water through infrequently used drains every week or two to keep the trap full and prevent biofilm from accumulating. Let houseplant soil dry between waterings, and consider switching to a well-draining potting mix if fungus gnats have been a recurring issue.
Because all four of these flies are under 4 mm long, standard window screens with damaged mesh or gaps around the frame won’t keep them out. Check screens for tears, and make sure doors and windows seal tightly. That said, most indoor infestations start from eggs already present on produce or in soil rather than flies entering from outside. The most reliable prevention is eliminating the damp, organic material they need to reproduce.