If you feel like you cannot pour a cup of coffee or water a houseplant (yes, even a pothos) without a cloud of tiny flying bugs showing up, you are not imagining it. Indoor “gnats” are usually one of a few small insects that thrive when there is moisture, fermenting food, or damp organic buildup nearby. The good news is that once you identify which one you have, the fix is usually straightforward and very backyard realistic.

Quick answer: why so many gnats?
A sudden swarm indoors usually means you have a breeding site somewhere in the house. Adult gnats are annoying, but the real issue is eggs and larvae developing in:
- Damp potting soil (classic fungus gnat situation)
- Overripe fruit or fermenting food residue (often fruit flies)
- Sink and floor drains with slime buildup (drain flies and similar small flies)
- Wet trash, recycling, mops, and rags that stay damp
- Moisture problems like a leak, wet crawlspace, or consistently humid areas
When conditions are right, these insects reproduce fast, so what looks like “they came out of nowhere” is usually a full life cycle completing indoors.
Step one: figure out what you are seeing
People call a lot of things “gnats.” Identification does not need a microscope, just a couple of quick observations.
Fungus gnats
- Quick look: tiny, dark, slender little flies with long legs, usually 1 to 3 mm
- Where you notice them: hovering near houseplants, windows, or lights
- What they do: slow, fluttery flying; they often run on the soil surface
- Big clue: you water a plant and they pop up from the pot
Fruit flies
- Quick look: tan to brown, compact bodies with noticeable red eyes (often), about 2 to 4 mm
- Where you notice them: around fruit bowls, compost caddies, recycling, bottles and cans
- What they do: quick, darting flight; they crowd around anything sweet or fermenting
- Big clue: you see them most in the kitchen and near food
Drain flies (moth flies)
- Quick look: tiny gray or brown flies with fuzzy, moth-like wings, often 2 to 5 mm
- Where you notice them: near sinks, tubs, floor drains, or laundry areas
- What they do: they rest on walls close to drains; they are not strong fliers
- Big clue: they keep showing up even when you remove food and treat plants
Phorid flies (a common lookalike)
- Quick look: small dark flies with a slightly “humped” back
- What they do: they often scuttle and run on surfaces more than they fly
- Big clue: persistent activity near trash, leaks, or drains (sometimes tied to plumbing or sewage issues)
If you want a fast test, place a small sticky trap near plants and a separate one near the kitchen sink. Where the majority collects is usually a strong clue to your source, although adults can roam.
Why fungus gnats happen
Fungus gnats are tied to consistently moist potting mix. The adults are annoying, but the larvae are the reason you keep getting more. Larvae feed on fungi, decaying organic matter, and sometimes fine roots when populations are heavy.
Common houseplant triggers
- Overwatering or watering on a schedule instead of by feel
- Pots without good drainage or trays that hold water
- Very organic mixes that stay wet (lots of peat, compost, fine particles)
- Top-dressing with compost indoors, which can stay damp
- Bringing home an infested plant from a nursery
Garden-friendly fixes that actually work
- Let the surface dry between waterings. For many plants, that means the top 1 to 2 inches, or until the top layer feels dry to the touch. This alone cuts egg laying.
- Bottom-water for a few weeks so the surface stays drier.
- Use yellow sticky traps to knock down adults and track progress.
- Use BTI (often sold as mosquito bits or dunks) as a soil drench to target larvae. Follow your product label directions. Some products require soaking bits in water, then straining, before drenching. Repeat as directed for a few cycles.
- Clean up the soil surface by removing algae or mushy organic top layers and replacing with fresh potting mix.
- Repot if needed if the mix is compacted or staying wet too long. Use a chunkier mix that drains better.
About the “cover the soil with sand” trick: it can reduce adult egg-laying and adult emergence if it stays dry, but it will not fix an already-wet mix or larvae deeper in the pot. In real homes, it often stays damp and becomes one more soggy layer.
One extra note if you start seeds indoors: fungus gnat larvae tend to be tougher on seedlings and fresh cuttings than on established houseplants. Keeping propagation trays on the drier side (as appropriate for the plant) really helps.
Why fruit flies show up
Fruit flies are attracted to fermenting sugars. A kitchen can look spotless and still have enough residue to feed a population, especially in warm weather.
Sneaky sources
- Overripe produce (bananas, tomatoes, onions, potatoes)
- Recycling with a little liquid left in cans, bottles, and jars
- Compost caddies and food scrap containers
- Spills under appliances like the fridge or toaster area
- Trash can buildup on the rim, lid, or bottom
- Dirty mops and sponges that stay damp
Fast, effective cleanup plan
- Remove all ripe fruit from the counter. Store produce in the fridge for a week.
- Rinse recycling and take it out frequently.
- Scrub the trash can with hot soapy water, especially around the lid and lip.
- Wipe hidden zones like under the fruit bowl, under appliances, and the cabinet where potatoes live.
- Wash sponges and rags in hot water, then dry completely. Replace if they smell sour.
Simple trap (to reduce adults while you clean)
Put a small bowl of apple cider vinegar with a drop of dish soap on the counter. It will catch adults, but remember: traps help you measure and reduce the swarm. The real win is removing the breeding food source.
Why drain flies happen
Drain flies breed in the organic film inside pipes and traps. Spraying adults does not touch the larvae living in that slimy layer.
What to do instead
- Pick the likely drain (kitchen sink, bathroom sink, shower, floor drain, laundry).
- Clean the drain walls using a stiff drain brush to scrub the inside edge and a bit down the pipe. Mechanical cleaning is the main event here.
- Flush with hot tap water after scrubbing. (Boiling water is not necessary and can be risky for some plumbing setups.)
- Use an enzyme drain cleaner at night for several days (follow label directions). Enzymes target the organic buildup where larvae feed.
- Fix slow drains and leaks. A constantly damp trap area is basically a nursery.
If you see gnats near a rarely used drain, run water in it weekly to keep the trap filled and reduce breeding opportunities.
House-wide reasons you might be getting gnats
Sometimes the issue is not just plants or fruit. If you keep treating the obvious and they return, zoom out.
- High humidity: basements, laundry rooms, and bathrooms can support breeding sites. Use a dehumidifier if needed.
- Water leaks: under sinks, behind toilets, around the fridge line, or near HVAC condensate drains.
- Pet areas: wet food bowls, litter boxes, and pee pads can attract small flies if not cleaned daily.
- Indoor seed starting: heat mats, domes, and consistently moist trays are fungus gnat magnets.
What not to do
- Skip foggers and “bug bombs” indoors. They rarely solve the breeding site and add unnecessary pesticide exposure.
- Do not mix drain cleaners. Especially avoid combining bleach with other products. Pick one approach and follow the label.
- Do not rely on spraying adults. You will feel productive for about five minutes, then the next batch hatches.
- Avoid heavy insecticide use around food and kids/pets. In most cases, sanitation plus moisture control plus targeted larval treatment is enough.
7-day action plan
If you want a clear start-to-finish approach, this is the schedule I would use in a normal home.
Day 1: Identify and monitor
- Put sticky traps by plants and near the sink area.
- Remove fruit from counters and take out trash and recycling.
Day 2 to 3: Remove breeding sites
- Let plant surfaces dry and empty saucers.
- Scrub the trash can and wipe down hidden food residue areas.
- Brush and flush the most suspect drain.
Day 4 to 7: Hit the larvae
- For plants: apply BTI drench (per your label) and repeat as directed.
- For drains: use enzyme cleaner nightly for several days.
- Refresh traps and keep surfaces dry.
Many homes see a big drop within about a week, but complete control often takes 2 to 3 weeks because you are interrupting a life cycle, not just swatting adults.
Prevention tips
- Water plants by need, not habit. Lift the pot, check soil moisture, and avoid keeping mix constantly damp.
- Quarantine new houseplants for a couple weeks and use a sticky trap in the pot.
- Store produce smart and clean the fruit bowl weekly.
- Rinse recycling and do not let it sit warm for long periods.
- Keep drains maintained with occasional brushing and hot water flushes, especially in summer.
- Address moisture with ventilation or a dehumidifier if you have a chronically damp room.
When it might be something else
If you have tried the steps above and still see heavy activity, consider these possibilities:
- Sewage odor or persistent drain fly swarms: could indicate a plumbing issue or broken seal.
- Gnats clustering at windows but not near plants or drains: they may be coming from outside and attracted to light. Check window screens and gaps.
- Very tiny insects that jump on soil: those may be springtails, which usually indicate wet conditions and are more nuisance than plant pest.
- Lots of “gnats” that run fast (scuttle) near baseboards or sinks: look into phorid flies and check for hidden leaks, gunky trash zones, or drain issues.
If you want to get very exact, take a close-up photo of the bug and note where you see the most activity. Location is often more informative than the insect itself.
Jose Brito
I’m Jose Britto, the writer behind The Country Store Farm Website. I share practical, down-to-earth gardening advice for home growers—whether you’re starting your first raised bed, troubleshooting pests, improving soil, or figuring out what to plant next. My focus is simple: clear tips you can actually use, realistic expectations, and methods that work in real backyards (not just in perfect conditions). If you like straightforward guidance and learning as you go, you’re in the right place.