Pest Control for Home: Identify, prevent & control any home pest — honestly.
In-Depth Guide Researched & Fact-Checked

How to Get Rid of Gnats in the House

A detailed companion guide: how to get rid of gnats in the house.

"Gnat" is a catch-all term for several tiny flying insects, and getting rid of them starts with figuring out which one you have. The three you are most likely to see indoors, fungus gnats, fruit flies, and drain flies, breed in different places, so the same trap will not solve all of them. Identify the source and the fix follows.

Identify Your Gnat First

  • Fungus gnats are dark, delicate, mosquito-like flies that hover around houseplants and run across the soil surface. They breed in the moist potting soil of overwatered plants, where larvae feed on fungus and organic matter.
  • Fruit flies are small and tan to reddish, often with red eyes, and cluster around ripening fruit, trash, and recycling. They breed in fermenting produce and organic residue.
  • Drain flies (also called moth flies) are fuzzy, moth-like, and appear near sinks, showers, and floor drains. They breed in the gelatinous organic film inside drains.
Watching where the gnats congregate usually tells you which one you have, and that determines the cure.

Fungus Gnats: Dry Out the Soil

Because fungus gnat larvae need consistently moist soil, the fix is to let the top of the soil dry out between waterings. Water houseplants less frequently and only when the top inch or two is dry; this alone kills off larvae over time. Adding a layer of sand or fine gravel on top of the soil discourages egg-laying. Bottom-watering keeps the surface drier. For persistent cases, a Bti product labeled for fungus gnats (the same bacterium used against mosquito larvae) can be applied to the soil per its label; read and follow the EPA product label. Yellow sticky traps set at soil level catch the adults and help you monitor progress.

Fruit Flies: Remove the Fermenting Source

For fruit flies, eliminate breeding material: refrigerate or toss overripe produce, empty trash and recycling often, rinse containers before binning them, and wipe up spills. Pair that with an apple cider vinegar trap (vinegar plus a drop of dish soap) to catch the remaining adults. Without removing the source, traps alone never end the problem.

Drain Flies: Clean the Drain

Drain flies point to organic buildup inside a drain. Confirm the drain is the source by taping a cup or a sticky note (sticky side down) over it overnight; flies emerging get caught. Then clean the drain: physically scrub the inside of the pipe with a long brush to break up the film where larvae live, and flush with hot water. Enzyme-based drain cleaners designed to digest organic matter can help maintain it. Avoid relying on pouring bleach alone, since it rinses past the clinging film without removing it.

General Habits and When to Escalate

Across all gnat types, the pattern is the same: find and remove the breeding site, then trap the leftover adults. Keep produce covered, drains clean, and plants from staying waterlogged. Screen windows and doors to reduce outdoor gnats coming in.

If gnats persist after you have addressed the likely sources, you may have more than one type at once, a hidden moisture problem (a leak feeding a drain fly population, for example), or a breeding site you have not found. In that case, or if the infestation is large and ongoing, a licensed pest professional can help identify the species and locate the source.

Frequently Asked Questions

Watch where they gather. Fungus gnats hover around houseplants and run over the soil surface. Fruit flies cluster near ripening fruit, trash, and recycling and are tan to reddish, often with red eyes. Drain flies are fuzzy and moth-like and appear near sinks, showers, and floor drains. Identifying the type matters because each breeds in a different place and needs a different fix.

Let the top inch or two of soil dry out between waterings, since the larvae need consistently moist soil to survive. Water less often and consider bottom-watering or topping the soil with sand to discourage egg-laying. Yellow sticky traps catch adults, and for stubborn cases a Bti product labeled for fungus gnats can be applied to the soil following the EPA product label.

Those are likely drain flies, which breed in the gelatinous film of organic matter clinging inside drain pipes. Confirm it by covering the drain overnight with a sticky note and checking for trapped flies. To fix it, physically scrub the inside of the pipe with a long brush to remove the film, then flush with hot water. Enzyme drain cleaners help with maintenance; bleach alone usually will not remove the film.

Continue Reading