The gnats in your house are almost certainly breeding somewhere indoors, not wandering in from outside. The most common culprits are overwatered houseplant soil, ripe fruit on the counter, or organic buildup inside your drains. Each source attracts a different type of tiny fly, and identifying which one you’re dealing with is the fastest way to eliminate them.
Which “Gnats” You’re Probably Seeing
People use “gnat” as a catch-all, but the tiny flies swarming your kitchen or bathroom are usually one of three species, each with a different breeding source.
- Fungus gnats are dark-bodied, mosquito-shaped flies that hover around houseplants. You’ll notice them lifting off the soil surface when you water. Their larvae live in the top layer of potting mix, feeding on decaying organic matter and fungi.
- Fruit flies are the tan or brownish-yellow flies with red eyes, about 3 to 4 millimeters long, that cluster around your fruit bowl, compost bin, or recycling. They’re drawn to anything ripe or fermenting.
- Drain flies are fuzzy, moth-like flies that sit on bathroom walls near sinks, showers, or floor drains. They breed in the slimy organic film that coats the inside of pipes.
If the gnats are near your plants, they’re fungus gnats. Near food or garbage, fruit flies. Near sinks or showers, drain flies. Once you know the type, you know exactly where to look.
Houseplants Are the Most Common Source
Fungus gnats are the number one reason people suddenly notice gnats indoors, and the cause is almost always overwatering. Female fungus gnats lay up to 200 eggs in clusters on the surface of moist potting soil. The eggs hatch into larvae that feed on decaying organic debris and fungi in the mix. As long as the soil stays damp, the cycle repeats continuously, producing new waves of adults every few weeks.
The fix is straightforward: let the top inch of soil dry out completely between waterings. Fungus gnat eggs and young larvae can’t survive in dry conditions, so this single change breaks the breeding cycle. Make sure your pots have drainage holes and aren’t sitting in saucers full of standing water. Bags of potting soil stored in garages or sheds can also harbor eggs, so check those too.
If you have a heavy infestation, yellow sticky traps placed near the soil surface will catch adults before they can lay more eggs. This won’t solve the problem on its own, but it reduces the population while drier soil conditions kill off the larvae below.
Ripe Fruit and Hidden Fermenting Sources
Fruit flies reproduce explosively because they don’t need much. A single bruised banana, a splash of juice at the bottom of a recycling bin, or a forgotten potato in the back of a pantry can sustain a colony. They’re attracted to the yeast and bacteria produced during fermentation, which is why they seem to appear out of nowhere the moment fruit starts to turn.
Start by removing or refrigerating all ripe fruit. Then check the less obvious spots: the drip tray under your fridge, the garbage disposal (food scraps cling to the splash guard), empty bottles and cans in recycling, damp sponges, and mop buckets. Any moist organic residue is a potential breeding site.
A simple trap can knock down adults while you eliminate sources. Pour about half an inch of apple cider vinegar into a jar and add a single drop of dish soap. The vinegar’s fermentation scent draws the flies in, and the soap breaks the surface tension so they sink instead of landing and flying away. This works specifically for fruit flies. It won’t attract fungus gnats or drain flies, so if the trap sits empty, you’re dealing with a different species.
Drain Buildup Creates a Hidden Nursery
Drain flies breed in the slimy layer of soap scum, hair, bacteria, and organic sludge that coats the inside of pipes. They favor drains that are used infrequently, like a guest bathroom shower or a basement floor drain, where water sits in the trap and stagnates. But they can also appear in everyday kitchen and bathroom sinks where buildup has accumulated over time. Leaking pipes or drains that create hidden pools of moisture are another common breeding site.
Chemical drain cleaners in liquid form tend to run through too quickly to help. The goal is to physically remove the organic film clinging to pipe walls. A small plastic drain snake will pull out hair and trapped debris. Following up with a bottle brush pushed into the first few inches of the drain scrubs off the biofilm where larvae live. For bathroom sinks, removing and cleaning the pop-up stopper (which collects a surprising amount of gunk) makes a noticeable difference.
For a more thorough cleaning, you can unscrew the P-trap (the curved pipe section under the sink) and scrub it out. Enzyme-based drain cleaners, the kind marketed for clog prevention rather than clog removal, are also useful because they cling to pipe walls and break down organic residue over time. Once the film is gone, the flies lose their food source and breeding habitat.
Why They Seem to Multiply So Fast
All three species share one trait that makes infestations feel sudden: short generation times. Fungus gnats can go from egg to adult in roughly three to four weeks under warm indoor conditions. Fruit flies are even faster, sometimes completing their life cycle in about a week during summer. A single female fungus gnat laying 200 eggs means one overlooked pot of soggy soil can produce hundreds of adults in under a month. By the time you notice a few flying around, the next generation is already developing out of sight.
This is also why killing adults alone doesn’t work. Swatting flies or running a vacuum over them provides temporary satisfaction, but the larvae developing in soil, drains, or hidden food waste will replace them within days. Elimination always comes down to finding and removing the breeding source.
Moisture and Warmth Tie It All Together
Every indoor gnat problem traces back to the same basic equation: moisture plus organic material plus warmth. Your house provides stable temperatures year-round, which is why gnat problems can start in any season, not just summer. Winter infestations are especially common with fungus gnats because people bring plants indoors and keep them in warm rooms with less air circulation.
A few practical changes reduce the conditions all three species need. Empty and clean drip trays under plants weekly. Run the garbage disposal with cold water for 15 to 20 seconds after use to flush food particles. Take compost and garbage out regularly. Wipe down counters where juice or wine has spilled. Clean drains with a brush monthly if you’ve had problems before. These are small habits, but they eliminate the micro-environments where gnats establish themselves before a population can take hold.
When the Source Isn’t Obvious
Sometimes gnats persist even after you’ve checked plants, fruit, and drains. In those cases, look for hidden moisture problems: a slow leak under a sink, a drip behind a washing machine, condensation on basement pipes, or a forgotten bag of potatoes or onions in a cabinet. Damp crawl spaces or water-damaged areas under flooring can also breed gnats that find their way into living spaces. Sewer lines that occasionally back up or “burp” can introduce drain fly larvae directly into your home through floor drains.
If you can’t locate the source, place a few traps in different rooms. Where they collect the most flies points you toward the breeding area. For drain flies specifically, you can tape a piece of clear plastic wrap over a suspect drain overnight, leaving the edges unsealed. If flies are breeding inside, you’ll find them stuck to the underside of the wrap by morning.