Skip to content
Swat & Snap
Fruit Flies & Gnats

How to get rid of gnats

Indoors, gnats are a watering habit rather than an infestation. Change the habit and the problem ends — but it takes a generation, not a weekend.

By Ryder M.Published Updated

A monstera plant by a window casting soft shadows
Quick answer
Let the top inch of every plant's soil dry out completely between waterings — that alone breaks the life cycle. Add sticky stakes to catch adults and a BTI granule product to kill larvae if the bloom is bad. Expect three weeks rather than three days, because a generation has to pass.
Disclosure

Swat & Snap earns a commission from qualifying purchases made through the links on this page, at no extra cost to you. It does not change which products we pick — see how we pick and our affiliate disclosure.

Check you have gnats and not something else

"Gnat" gets used for any small flying insect, and the three common indoor candidates need three different fixes.

  • Fungus gnats — dark, slender, long-legged, weak fliers drifting up off plant soil and gathering at windows. This page.
  • Fruit flies — rounded, tan, often red-eyed, hovering around fruit and bins. Different page.
  • Drain flies — fuzzy, moth-like, sitting still on a wall near a sink. Different page again.

Gnats vs fruit flies vs drain flies sorts it in a minute. If the insects are coming off your houseplants, read on.

What is actually happening

Fungus gnat larvae live in the top inch or two of potting soil and eat fungus and decaying organic matter. They need that layer to be consistently damp. The adults you see are short-lived, largely harmless, and are a symptom rather than the problem.

The cause, nearly every time, is overwatering — or more precisely, keeping the surface of the soil wet.

That is good news and bad news. Good, because the fix costs nothing. Bad, because it takes a full generation to work through: eggs hatch in a few days, larvae feed for a couple of weeks, pupation takes several days. Three weeks is a realistic timeline, and anyone promising two days is selling something.

Step 1 — change how you water

This is the whole treatment. Everything else is acceleration.

  • Let the top inch dry completely between waterings. Push a finger in. If it is damp at the first knuckle, wait. Larvae cannot survive a dry surface layer.
  • Water from the bottom where the plant tolerates it: stand the pot in a tray, let it take up what it needs for twenty minutes, then pour off the rest. The roots drink; the surface stays dry.
  • Empty the saucers. A pot standing permanently in water keeps the mix saturated regardless of what you do above.
  • Check the drainage. A pot with a blocked hole or no hole at all is a bog with a plant in it.

Most houseplants tolerate this comfortably. The ones that genuinely want constant moisture — some ferns, carnivorous plants — are the ones to manage differently, and for those, a surface barrier is the better tool.

Step 2 — kill the larvae that are already there

BTI. Bacillus thuringiensis israelensis is a bacterium lethal to fungus gnat larvae and mosquito larvae, and to essentially nothing else. It is the same active in mosquito dunks and bits, and the granule form is the practical one here: sprinkle on the soil surface, or steep in water and use it to water the plants for a week or two.

It is the one genuinely effective, genuinely low-risk larval treatment for houseplants, and the fact that the same product also handles a rain barrel outdoors is a small bonus. Mosquito dunks vs bits covers the difference between the formats.

A sand or grit top dressing. Half an inch of coarse sand, horticultural grit or perlite on the surface dries fast and gives the adults nowhere to lay. It works well alongside the watering change, particularly on plants that must stay moist.

Hydrogen peroxide solution. Widely recommended online, and it does kill larvae on contact. It is also indiscriminate, short-lived, and hard on soil life. We would use BTI instead.

At a glance

Quick picks

#ProductBest forMechanismPrice
1
Hands potting a houseplant, with soil and garden tools alongside
Our pickSafer Brand Houseplant Sticky StakesYellow sticky cards on a stake, pushed into the pot. They catch the adults while you fix the watering, which is the part that actually ends a gnat problem.
Gnats in potting soilYellow adhesive card
2
A metal watering can beside green shrubs in a garden
Summit Mosquito BitsThe same BTI in granules. Releases faster than a dunk and doubles as the correct treatment for fungus gnats in houseplant soil.
Fast knockdown and fungus gnatsBTI granules
3
A collection of succulents and cacti in pots indoors
Katchy Indoor Insect TrapUV light, a small fan and a sticky pad. The fan is what makes it work on gnats — they are weak fliers and get pulled in.
Fungus gnats around plantsUV light + suction fan + glue board
4
A pair of electrical sockets on a plain painted wall
Zevo Flying Insect TrapA plug-in that pairs blue and UV light with a sticky cartridge. It runs quietly in the background, which is exactly what people want from a fly problem.
Rooms you want handled passivelyBlue + UV light, sticky cartridge

#ad — every price link goes to Amazon and Swat & Snap earns a commission on qualifying purchases. No price is shown until it can be pulled live from the retailer.

Hands potting a houseplant, with soil and garden tools alongside
Our pickPet-safe design

Safer Brand Houseplant Sticky Stakes

Safer Brand · Gnats in potting soil

Yellow sticky cards on a stake, pushed into the pot. They catch the adults while you fix the watering, which is the part that actually ends a gnat problem.

Specification
MechanismYellow adhesive card
PlacementIn the pot, just above the soil
LifeUntil the card is full
ChemicalsNone
Why it is here
  • Also a diagnostic: a full card in three days tells you the soil is the source
  • No chemistry near a plant you might eat from
What it will not do
  • Adults only — larvae in the soil need drying out or a BTI product
  • Visible yellow cards in a display pot

Check price on Amazon

A metal watering can beside green shrubs in a garden
Pick 2Pet-safe design

Summit Mosquito Bits

Summit · Fast knockdown and fungus gnats

The same BTI in granules. Releases faster than a dunk and doubles as the correct treatment for fungus gnats in houseplant soil.

Specification
ActiveBTI granules
ReleaseRapid, roughly 24 hrs
Duration7-14 days
Second useFungus gnat larvae in pots
Why it is here
  • Scatterable, so it treats a bog or a tray a dunk cannot sit in
  • The one product that solves both a yard problem and a houseplant problem
What it will not do
  • Shorter residual than a dunk — reapply more often
  • Granules wash away in heavy rain

Check price on Amazon

A collection of succulents and cacti in pots indoors
Pick 3Pet-safe design

Katchy Indoor Insect Trap

Katchy · Fungus gnats around plants

UV light, a small fan and a sticky pad. The fan is what makes it work on gnats — they are weak fliers and get pulled in.

Specification
MechanismUV light + suction fan + glue board
PowerUSB
RefillGlue boards
NoiseLow fan hum
Why it is here
  • The fan catches fungus gnats that simply ignore a light-only trap
  • USB power means it can sit on a plant shelf with no socket nearby
What it will not do
  • Needs the room dark to compete with a window
  • Glue boards fill quickly in a real gnat bloom

Check price on Amazon

A pair of electrical sockets on a plain painted wall
Pick 4Pet-safe design

Zevo Flying Insect Trap

Zevo · Rooms you want handled passively

A plug-in that pairs blue and UV light with a sticky cartridge. It runs quietly in the background, which is exactly what people want from a fly problem.

Specification
MechanismBlue + UV light, sticky cartridge
PowerMains plug-in, always on
RefillCartridge, roughly monthly
NoiseSilent, no zap
Why it is here
  • No zapping noise and no insect debris — it is a sticky pad behind a light
  • Catches gnats and small flies that a vinegar trap ignores
What it will not do
  • Cartridges are an ongoing cost that outruns the unit price fast
  • Needs a dark room to compete with daylight

Check price on Amazon

Step 3 — catch the adults

This does not fix the problem, but it lowers the population and makes the room livable while the soil dries.

  • Yellow sticky stakes pushed into the pot, just above the soil. They are also a diagnostic: a card covered in three days confirms the soil is the source, and a card that stays clean means look elsewhere.
  • A light-and-fan trap for the room. The fan is the important part — fungus gnats are weak fliers and get pulled in rather than having to land.
  • A plug-in light trap in a dim corner for ongoing passive control.
  • Cider vinegar traps catch some fungus gnats but far fewer than they catch fruit flies. If your vinegar trap is barely filling, that is consistent with gnats rather than evidence the trap is broken.

Step 4 — deal with the source of new ones

  • New plants frequently arrive with gnats. Quarantine a new plant away from the others for a fortnight.
  • Bags of potting mix stored damp, particularly opened bags kept outdoors or in a garage, are a common origin. Store them sealed and dry.
  • Repotting an infested plant into fresh mix works, and is worth it for a plant that is genuinely struggling — remove as much old soil from the roots as the plant tolerates.

The realistic timeline

  • Week 1: adults still visible, sticky cards filling. Soil starting to dry.
  • Week 2: noticeably fewer. Larvae dying off as the surface stays dry.
  • Week 3: effectively clear if the watering change held.
  • Week 4 onward: if they are back, something is still wet — a saucer, a pot without drainage, or one plant you are still watering the old way.

Gnats that are not fungus gnats

  • Outdoors, biting, in swarms near water: likely blackflies or biting midges. Different problem, and a skin repellent is the practical answer — the CDC-listed actives are here.
  • Small flies in a bathroom, sitting still: drain flies. Here.
  • Clouds of tiny flies outdoors in the evening, not biting: probably non-biting midges, which are a nuisance rather than a pest and are best waited out.
Questions

Frequently asked

Why do I suddenly have gnats in my house?
Almost always overwatered houseplants. Fungus gnat larvae live in the top inch of damp potting soil, and a change in watering, a new plant, or a fresh bag of mix is usually what started it.
How long does it take to get rid of fungus gnats?
About three weeks. Eggs hatch in a few days, larvae feed for a couple of weeks and then pupate, so a full generation has to pass even after the soil dries. Anything promising two days is describing fruit flies, not gnats.
Does cinnamon get rid of fungus gnats?
It has mild antifungal properties and may slightly reduce the food supply in the top layer, but it is not a treatment. Letting the surface dry out and applying BTI does the actual work.
Will fungus gnats hurt my plants?
Adults do not. Larvae feed mainly on fungus and decaying matter, but in heavy numbers they will graze fine root hairs, which matters most for seedlings and cuttings. For an established houseplant the damage is usually minor and the nuisance is the real problem.
Do gnats bite?
Fungus gnats do not — they have no interest in people. If something small is biting you outdoors, it is more likely a blackfly or a biting midge, which is an outdoor problem needing a skin repellent.
Sources
Next step

More on fruit flies & gnats

Tiny flies in the kitchen are almost never one problem. Identify which of the three you have, then treat the source — the trap alone never finishes it.

Not sure yet? Read how we pick.

About the author

Ryder M.

Ryder M. is the hands-on owner behind Magoo Media Group. He writes Swat & Snap because he got tired of pest-control advice that was either a sales pitch or a scare story.

How we pick · Editorial policy · About Swat & Snap

Read next