Those tiny flies that appeared out of nowhere in your house are most likely fungus gnats, small dark insects that breed in the moist soil of houseplants. They’re the number one culprit when you suddenly notice a cloud of small flies indoors, especially during fall and winter. The good news: they’re harmless to you, and getting rid of them is straightforward once you understand what’s driving the outbreak.
Confirm What You’re Dealing With
Three types of small flies commonly show up indoors, and each one points to a different source. Knowing which you have saves you from treating the wrong problem.
Fungus gnats look like tiny mosquitoes with long legs and dark brown or black bodies. You’ll spot them hovering around houseplants or flying toward windows and light sources. If you see a swarm of bugs flitting above a potted plant, fungus gnats are almost certainly the answer.
Fruit flies are shaped more like a miniature house fly, about ⅛-inch long, often with red eyes and a striped abdomen. They cluster around fruit bowls, trash cans, recycling bins, and kitchen drains. They’re drawn to ripe or rotting fruit, sugary liquids, and alcohol.
Drain flies have fuzzy, moth-like bodies with broad wings, light gray or tan in color. They breed in the sludgy buildup inside sink drains and floor drains, and they tend to land clumsily on nearby walls and ceilings rather than flying around the room.
If the flies are near your plants, keep reading. If they’re near your fruit or drains, the fix is cleaning those areas instead.
Why They Appeared So Suddenly
Fungus gnat infestations feel like they come out of nowhere because the adult flies you’re seeing represent a generation that developed invisibly in your potting soil over the previous few weeks. The larvae are tiny, translucent, and live beneath the soil surface where you’d never notice them. By the time adults start flying around your kitchen, there may already be eggs from the next generation in the soil.
The main trigger is overwatering. Fungus gnat larvae feed on decaying organic matter in moist soil, so consistently wet potting mix is the perfect breeding ground. This is why infestations spike in winter. As daylight weakens and indoor plants grow more slowly, they use less water. If you keep watering on the same schedule you used in summer, the soil stays waterlogged, and fungus gnats move in.
Gardeners at the Brooklyn Botanic Garden report hearing from people with winter gnat problems who were watering on a fixed weekly schedule rather than checking whether the soil had actually dried out. That single habit is the most common cause of a sudden outbreak.
Other triggers include bringing home a new plant that already has eggs or larvae in its soil, using potting mix that was stored in damp conditions, or having organic mulch or compost near your plants.
Can They Damage Your Plants?
Adult fungus gnats don’t bite, don’t spread disease, and don’t eat your plants. They’re a nuisance, not a health concern. The larvae are the ones that can cause problems, but typically only when populations get large. In high numbers, larvae damage roots and stunt growth, particularly in seedlings and young plants. According to UC’s Integrated Pest Management program, significant root damage and even plant death have been documented in houseplants kept in moist, organically rich soil with heavy infestations.
One thing worth knowing: a houseplant that’s wilting despite regular watering may not need more water. It could signal root damage from larvae, or more commonly, root rot from the same overwatering that attracted the gnats in the first place.
Stop the Breeding Cycle First
Every treatment works better when you cut off the conditions gnats need to reproduce. The single most effective step is letting the top inch of soil dry out completely between waterings. Female fungus gnats lay their eggs in moist surface soil, and they won’t deposit eggs in dry material. This alone can break the cycle.
If your plants need consistent moisture at the root level, switch to bottom watering. Set pots in a tray of water and let the soil wick moisture upward. The roots stay hydrated while the surface stays dry and unappealing to egg-laying adults.
For an extra layer of protection, cover the soil surface with a quarter-inch layer of coarse sand or fine vermiculite. Fungus gnats can only lay eggs about 1/16 of an inch deep and won’t lay them in inert, non-organic material. Sand or vermiculite acts as a physical barrier that blocks egg-laying without affecting your plant’s health. Seedlings push through it easily. A note on a popular suggestion: diatomaceous earth is often recommended, but fungus gnats don’t have the hard exoskeleton that makes it effective against other insects. It won’t solve this problem.
Kill Larvae Already in the Soil
Drying out the soil handles future generations, but you’ll still have larvae developing below the surface from eggs already laid. A hydrogen peroxide soil drench is one of the simplest ways to deal with them. Mix one part standard 3% hydrogen peroxide (the kind sold at drugstores) with four parts water, then pour it over the soil as you would a normal watering. The mixture will fizz on contact as it kills larvae. It breaks down into water and oxygen, so it won’t harm your plant’s roots. Let the soil dry out fully afterward before watering again.
You can also repot the plant entirely in fresh, dry potting mix if the infestation is severe. Shake off as much of the old soil as possible from the roots before placing the plant in new mix. This physically removes the larvae and eggs rather than treating them in place.
Trap the Adults
While you’re targeting larvae in the soil, yellow sticky traps placed near your plants will catch the adults that are already flying around. Fungus gnats are strongly attracted to the color yellow. These inexpensive cards, available at any garden center, won’t eliminate an infestation on their own, but they reduce the number of adults laying new eggs and give you a visual gauge of how bad the problem is. When the traps stop catching new flies, you know you’ve broken the cycle.
A simple DIY alternative is a small dish of apple cider vinegar with a drop of dish soap near affected plants. The vinegar attracts the gnats, and the soap breaks the surface tension so they sink and drown. This works better for fruit flies than fungus gnats, but it catches some of both.
Preventing the Next Outbreak
Once you’ve cleared the infestation, the key is never going back to autopilot watering. Check the soil with your finger before adding water. If the top inch still feels damp, wait. This is especially important from October through March, when lower light levels mean your plants drink less.
When you buy a new houseplant, inspect the soil surface before bringing it inside. If you see tiny flies hovering around it at the nursery, either skip that plant or plan to repot it immediately. Bagged potting soil stored in warm, damp garden sheds can also harbor eggs, so keep unused bags sealed and dry.
Good drainage matters too. Make sure every pot has drainage holes and that plants aren’t sitting in saucers of standing water for hours after watering. Empty saucers 30 minutes after you water, or use a bottom-watering routine where you control the timing. Consistently well-drained soil is the least hospitable environment for fungus gnats, and once you adjust your habits, repeat infestations are rare.