Pests & Plant Diseases

How to Get Rid of Fungus Gnats on Houseplants for Good

By the Loam & Bloom Editorial Team · Published

There’s a specific moment familiar to almost every houseplant owner: you water a plant, walk away, and a few minutes later a small cloud of tiny black flies lifts off the soil surface. Those are fungus gnats, and while they’re more nuisance than genuine plant threat in most cases, they’re also one of the most reliable signals in houseplant care that something about a watering routine needs adjusting.

What fungus gnats are

Fungus gnats are small, dark, mosquito-like flies, typically about an eighth of an inch long, that are weak fliers and tend to stay close to the soil surface of infested pots rather than roaming widely around a room. The adults themselves do essentially no damage — they don’t bite, and they don’t feed on plant tissue. The problem is what they leave behind: female fungus gnats lay eggs in moist potting soil, and the larvae that hatch feed on organic matter, fungi, algae, and, in larger numbers, fine root hairs in the top layer of soil.

This life cycle is short — as little as two to three weeks from egg to adult in warm indoor conditions — which is exactly why an infestation can seem to explode from “a couple of annoying flies” to “a persistent cloud” within a matter of weeks if the underlying moisture conditions that support breeding aren’t addressed.

Why they show up in the first place

Fungus gnats are drawn overwhelmingly to one specific condition: consistently moist soil, particularly the top inch or two where their larvae feed and develop. Potting soil that’s kept damp for extended periods — from watering more often than a plant needs, from a pot without adequate drainage, or simply from a heavier hand with the watering can than a particular plant calls for — creates exactly the breeding ground fungus gnats need to establish and multiply.

This is why fungus gnats are also extremely common on newly purchased houseplants straight from a nursery or garden center, where commercial growing conditions often keep soil more consistently moist than most home environments maintain, and why a single new plant brought into a household can introduce gnats that then spread to other pots kept on a similarly generous watering schedule.

The real fix: change the watering habit

Products and traps help, but the most effective, sustainable fix for fungus gnats is the same one that comes up constantly in houseplant care generally: let the top inch or two of soil dry out between waterings rather than keeping it consistently damp. Fungus gnat larvae can’t survive extended dry periods in their breeding zone, so a watering routine that allows real drying between waterings disrupts their life cycle far more reliably than any spray or trap applied on top of an unchanged, too-frequent watering habit.

Checking soil moisture with a finger poked an inch or two down, rather than watering on a fixed calendar schedule regardless of how the soil feels, is the practical habit change that underlies most successful fungus gnat resolutions — the same principle covered in our guide to how often to water houseplants.

Sticky traps: monitoring and control in one

Yellow sticky traps, small cards coated in a non-toxic adhesive, are an effective and low-cost tool for fungus gnats, working on two levels at once. Placed horizontally just above the soil surface or standing upright in the pot, they catch adult gnats as they emerge and fly toward the trap’s color (fungus gnats, like many small flying insects, are strongly drawn to yellow). Every adult caught is one less gnat available to lay the next generation of eggs, which meaningfully slows the breeding cycle over time.

Just as usefully, sticky traps function as a simple diagnostic tool — counting how many gnats a trap catches over a few days, then comparing that count week to week, gives a concrete read on whether an infestation is shrinking in response to watering changes or holding steady, which is much more reliable than judging progress by how many gnats seem to be flying around at any given moment.

Soil drenches for an active infestation

For an infestation that needs a faster knockdown alongside the watering-habit fix, a diluted hydrogen peroxide soil drench is a widely used, low-cost home treatment. Standard 3% hydrogen peroxide, diluted at roughly one part peroxide to four parts water, poured through the soil like a normal watering, kills larvae in the top layer on contact through oxidation. It breaks down into ordinary water and oxygen shortly afterward, posing minimal risk to plant roots at this dilution, though it’s worth testing on a small area first with any particularly sensitive plant.

Bacillus thuringiensis israelensis (BTI) products, sold as “mosquito bits” or similar for exactly this kind of use, are another effective, low-toxicity larvicide — a biological control that targets fly and mosquito larvae specifically without harming plants, pets, or people, applied as a soil drench or worked into the top layer of soil.

Either treatment typically needs reapplying every week or so for two to three weeks, since a single application only kills larvae present at that moment — any eggs that hatch afterward need their own treatment, which is exactly why pairing a drench with the watering-habit change matters: without it, new eggs keep arriving as fast as old larvae are cleared.

A layer of sand or grit on the soil surface

Adding a thin, roughly quarter-inch layer of coarse sand, fine gravel, or diatomaceous earth on top of the potting soil creates a dry, inhospitable surface that discourages female gnats from laying eggs there in the first place, since they strongly prefer laying into visibly moist organic material rather than a dry mineral surface. This is a low-effort preventive step worth adding to any pot that’s had a previous gnat problem, and it doubles as a decorative top-dressing that many houseplant owners use anyway.

Fungus gnats versus fruit flies versus drain flies

It’s worth confirming the identification before starting treatment, since the fix for fungus gnats doesn’t address a fruit fly or drain fly problem, and vice versa. Fungus gnats are slender, dark, and long-legged with a distinctly mosquito-like silhouette, and they’re found specifically around potting soil rather than kitchen produce or drains. Fruit flies are noticeably smaller, tan or reddish-brown rather than uniformly dark, and cluster around ripening produce, empty containers, or drains rather than houseplant soil. Drain flies are fuzzy and moth-like in shape rather than mosquito-like, and stay near drains rather than dispersing around a room. A quick look at where the insects are concentrated — soil versus fruit bowl versus sink — usually settles which pest is present before any treatment begins.

A homemade apple cider vinegar trap

Alongside store-bought sticky traps, a simple homemade trap using apple cider vinegar with a drop of dish soap in a small shallow dish, left near affected pots, catches adult gnats effectively and costs essentially nothing. The vinegar’s scent draws gnats in, and the dish soap breaks the water’s surface tension so they sink rather than simply landing and flying off again. This isn’t as targeted or as easy to count for monitoring purposes as a yellow sticky trap, but it’s a useful supplemental control that most households can set up immediately from what’s already in the kitchen.

Cinnamon, sprinkled lightly on the soil surface, is a commonly recommended home remedy with some real basis — cinnamon has natural antifungal properties, and since fungus gnat larvae partly feed on fungi in the soil, reducing that food source can help discourage them somewhat. It’s a mild, supportive measure rather than a primary fix on its own, best used alongside the watering-habit change and a more direct larvicide rather than relied on in isolation.

When repotting is worth considering

For a pot with a severe, entrenched infestation that isn’t responding to drenches and watering changes after several weeks, repotting into fresh, sterile potting mix is a reasonable reset, particularly if the existing soil has become compacted or slow-draining in a way that’s contributing to the chronic moisture problem in the first place. Gently removing as much of the old soil from the root ball as is safe for the specific plant, inspecting roots for any damage from larvae feeding, and repotting into fresh mix in a pot with confirmed good drainage addresses both the existing larvae population and the underlying soil condition that let them thrive in the first place. This is a more drastic step best reserved for infestations that have resisted the more targeted measures above, rather than a first response to an ordinary, moderate gnat problem.

Preventing the next infestation

Once an active infestation is under control, a few ongoing habits keep fungus gnats from returning:

  • Water based on actual soil moisture, checked by hand, rather than a fixed schedule — this single habit prevents the chronic overwatering that invites gnats back in the first place.
  • Ensure pots have real drainage and aren’t sitting in a saucer of standing water, which keeps the bottom of the soil column from staying perpetually wet even when the surface has dried appropriately.
  • Quarantine new plant purchases for a couple of weeks before placing them near an established collection, since nursery-grown plants are a common source of new infestations riding in on already-damp soil.
  • Remove dead leaves and debris from the soil surface promptly, since decaying organic matter on top of the soil is an additional food source and breeding substrate for both larvae and the fungi they feed on.

Fungus gnats are more irritating than dangerous to most established, healthy houseplants, but they’re also one of the clearest signals in indoor plant care that a watering habit has drifted toward “more than the plant needs.” Treating the visible flies without adjusting that underlying habit tends to produce a frustrating cycle of temporary improvement followed by a return of the problem — while fixing the watering habit directly, alongside a couple of weeks of traps and a soil drench if needed, typically resolves it for good.

Frequently asked questions

What causes fungus gnats on houseplants?

Fungus gnats are drawn to consistently moist potting soil, where their larvae feed on organic matter, fungi, and algae in the top layer. Overwatering — keeping soil damp for extended periods rather than letting the top inch or two dry between waterings — is the single most common cause of an infestation taking hold.

Are fungus gnats harmful to my plants?

Adult fungus gnats are mostly a nuisance rather than a plant threat, but their larvae can damage fine root hairs and young seedling roots in large numbers, particularly stressing already-weak or newly propagated plants. A moderate infestation on an established, healthy plant usually causes more annoyance to the household than real harm to the plant itself.

How do sticky traps help with fungus gnats?

Yellow sticky traps placed just above the soil surface catch adult gnats as they emerge and fly around, which breaks the breeding cycle by removing egg-laying adults before they can lay another generation. They're also a genuinely useful diagnostic tool, since trap counts over time show whether an infestation is actually shrinking or just fluctuating.

Does letting soil dry out actually kill fungus gnat larvae?

Yes — fungus gnat larvae live in the top inch or two of consistently moist soil and can't survive extended dry periods, so allowing that top layer to dry out fully between waterings disrupts their life cycle directly. This single change, more than any product application, is usually what actually resolves a recurring infestation.

Can I use hydrogen peroxide to get rid of fungus gnat larvae?

Yes — a diluted hydrogen peroxide soil drench (typically one part standard 3% hydrogen peroxide to four parts water) kills larvae in the soil on contact through oxidation, while breaking down into water and oxygen shortly after, posing minimal risk to the plant's roots at that dilution. It's a widely used, low-cost home treatment, though it needs to be reapplied as new eggs hatch until the underlying moisture problem is corrected.

Will fungus gnats spread to my other houseplants?

Yes, readily — adult fungus gnats fly freely between pots, and any other plant kept consistently moist is a viable new breeding site. Isolating a newly infested plant while treating it, and checking watering habits across the whole collection, prevents a single infested pot from seeding gnats throughout an entire houseplant collection.

How long does it take to get rid of fungus gnats completely?

With consistent treatment — allowing soil to dry appropriately between waterings, sticky traps, and soil drenches as needed — most infestations clear up within two to four weeks, which covers enough of the gnat life cycle for existing larvae to die out and no new eggs to be laid. Skipping the watering-habit change and relying on traps alone typically stalls progress indefinitely, since new eggs keep replacing the ones removed.

Sources & further reading