How to Get Rid of Gnats in Your House for Good

September 13, 2026

Stylish assortment of potted succulents and cacti with lantern, captured on a windowsill.

Photo: pexels · PEXELS

Published Updated 3 min read

Those little black flies drifting around your plants are fungus gnats, and the adults you keep swatting live about a week anyway. The larvae are the real population, feeding in the top inch of damp potting soil. Let that layer dry out completely between waterings and the next generation never hatches.

Why swatting the adults changes nothing

A female fungus gnat lays eggs in wet soil within hours of emerging. By the time you notice a few adults circling a lamp, there is already a batch of translucent larvae down in the pot working through fungus, algae and decaying root matter. Clear every flier out of the room and the pot quietly produces more within days.

That is why the swatting feels endless. You are attacking the shortest and least important stage of the insect. The soil is where the animal actually lives, and the soil is the only thing you can change.

Drying the top layer is the whole fix

Gnat larvae cannot survive in dry medium. They need moisture and the fungal growth that comes with it, and both vanish when the surface dries.

  1. Stop watering on a schedule. Push a finger into the pot and only water when the top inch is dry, even if the plant looks like it wants a drink.
  2. Water from the bottom. Set the pot in a tray, let the mix wick moisture upward, then pour off whatever is left after twenty minutes.
  3. Empty every saucer. A saucer holding water keeps the bottom of the root ball soaked no matter how parched the surface looks.
  4. Cap the surface. A half inch of coarse sand or fine grit over the mix makes a poor egg laying site and dries fast.
  5. Lay yellow sticky cards flat on the soil. They will not clear an infestation, but they show you whether numbers are falling.

Repot anything that stays soggy no matter what you do. A pot with no drainage hole, or one packed with a heavy compost mix, holds water near the bottom for weeks.

Not every tiny fly indoors is a fungus gnat

What you see Likely insect Where it breeds
Weak drifting flier near plants, long dangling legs Fungus gnat Damp potting soil
Tan, hovers over the fruit bowl or recycling Fruit fly Fermenting food residue
Fuzzy and moth shaped, sits still on sink walls Drain fly Film inside drain pipes

Sorting this out matters because the fixes do not overlap at all. Drying your plants will do nothing for a drain that needs scrubbing, and scrubbing the drain will not touch a pot full of larvae.

Damp pockets people forget to check

Potting soil is the usual source, but any pocket of wet organic matter will do. Look at the reservoir in a self watering planter, the bag of mix that has sat open in the garage since spring, and the gap between a plant pot and the decorative sleeve it sits inside, where runoff collects out of sight.

Basements offer their own options. A slow leak under a sink, a sump pit with standing water, damp cardboard in a crawl space, all of it can feed small flies. If gnats keep reappearing while every plant is bone dry on top, the source is somewhere else in the house and the plants are innocent.

Related reading