Fungus Gnats on Houseplants: Get Rid of the Tiny Flies for Good

Published July 2026 · 12 min read

You water your plant, and a small cloud of tiny flies lifts off the soil. They drift lazily around the pot, land on your laptop screen, hover near your face. Every week there seem to be more of them. If your plant is suddenly full of tiny flies, you almost certainly have fungus gnats, and the good news is that they are one of the easiest houseplant pests to eliminate once you understand one thing: the problem isn't your plant. It's your watering.

This guide explains why your plants are attracting gnats in the first place, how to tell fungus gnats apart from fruit flies (they need completely different treatments), and every fix that works, ranked from the easiest to the nuclear option. Follow the plan below and the flies are typically gone within 3 to 4 weeks, permanently.

The 10-second version: Fungus gnats breed in moist potting soil. Let the top 2 inches of soil dry between waterings, put out yellow sticky traps for the adults, and drench the soil with BTI (Mosquito Bits) for the larvae. Dry soil plus BTI breaks the life cycle, and the cycle is the whole problem.

Why Is My Plant Attracting Gnats?

Fungus gnats are not attracted to your plant. They are attracted to what's in the pot: consistently damp potting mix rich in organic matter. Adult females lay their eggs (up to a couple hundred each) in the top layer of moist soil. The eggs hatch into tiny, translucent, thread-like larvae that live in the top 2 to 3 inches of the mix, feeding on fungus, algae, and decaying organic material. About two weeks later they pupate, emerge as adults, mate, and lay the next round of eggs in the same soil.

That whole life cycle takes roughly three to four weeks, and every stage of it depends on one thing: moisture in the top layer of soil. If the surface dries out, eggs desiccate and larvae die. This is why fungus gnats show up on the plants people love the most, the ones that get watered a little every day, and why the fix starts with your watering can, not a spray bottle.

A few conditions make a pot especially attractive to gnats:

  • Frequent shallow watering that keeps the surface permanently damp
  • Peat-heavy or compost-rich mixes that hold moisture and feed fungal growth
  • Poor drainage (no drainage hole, compacted soil, a saucer that stays full)
  • Decaying matter on the surface, like fallen leaves left on the soil
  • A new bag of potting mix that was already carrying eggs or larvae, which is a surprisingly common way infestations start

If your soil never gets a chance to dry, you may be dealing with a bigger issue than gnats. Our guide to overwatered vs. underwatered plants walks through how to diagnose chronic overwatering before it turns into root rot.

Fungus Gnats or Fruit Flies? Tell the Tiny Flies Apart

This matters more than it seems. Fruit fly remedies (vinegar traps on the counter, cleaning the drains) do nothing for fungus gnats, and soil treatments do nothing for fruit flies. Identify first, then treat.

TraitFungus gnatsFruit flies
Where they gatherAround plant pots; on or just above the soil surface; on windows near plantsAround ripe fruit, trash cans, sink drains, wine, vinegar, and dirty dishes
Body shapeSlender, mosquito-like, with long dangly legs and long antennaeRounder, stockier, more like a miniature housefly
ColorDark gray to blackTan to brownish, often with red eyes
Flight styleWeak, drifting zigzags; often prefer walking or hopping across soilQuicker, more direct flight around food sources
Where larvae liveTop 2 to 3 inches of moist potting soilFermenting fruit, drains, and trash, never in soil
What fixes itDrying the soil, BTI drench, sticky trapsRemoving fruit, cleaning drains, vinegar traps

The one-minute test

Tap the rim of the pot or ruffle the top of the soil with a finger. If tiny dark flies rise out of the pot itself, they are fungus gnats. Then place a slice of raw potato flesh-down on the soil and check it after a day or two: if small white larvae are munching the underside, you've confirmed fungus gnat larvae in the soil, and you know exactly where to aim your treatment.

People often search for "why is my plant attracting fruit flies," but true fruit flies have no interest in your plants. If the flies are coming from the pot, they are fungus gnats, and everything below applies.

Do Fungus Gnats Actually Hurt Plants?

The adults are harmless. They don't bite, don't sting, and don't chew leaves. They are purely an annoyance, drifting into your coffee and gathering on bright screens.

The larvae are a different story at high populations. Their preferred diet is fungus and decaying organic matter, but when there are a lot of them, they also feed on fine root hairs and tender young roots. Mature plants shrug off light feeding, but heavy infestations can cause yellowing lower leaves, wilting that doesn't respond to watering, and stunted growth. Seedlings, cuttings, and freshly propagated plants are the most vulnerable because they have so little root mass to spare, larvae can kill a tray of seedlings outright.

A few gnats are a cosmetic problem. Clouds of them, plus a plant that looks tired for no obvious reason, mean the soil is carrying a large larval population and it's time to treat properly. Not sure whether your symptoms point to gnats or something else entirely? Our full guide to common houseplant pests covers how to tell gnat damage apart from mites, thrips, and root problems.

How to Get Rid of Fungus Gnats: Every Fix, Ranked

The fixes below are ordered by how much they contribute to actually ending the infestation. You don't need all of them, the first three together handle the vast majority of cases. The key principle behind every one: kill the larvae and stop new eggs, don't just swat adults. Adults live only about a week; the soil is the factory.

1. Let the top 2 inches of soil dry between waterings

1

This is the single most effective fix and it costs nothing. Fungus gnat eggs and larvae cannot survive in dry soil. Push a finger 2 inches into the mix before you water; if it feels damp at all, wait. For most tropical houseplants, this drying interval is not just gnat control, it's better watering practice that the plant will thank you for.

Expect the adult flies to persist for a week or two after you change your watering, they're the tail end of the last generation that hatched. As long as no new eggs survive, the population collapses on its own.

2. Yellow sticky traps for the adults

2

Fungus gnat adults are strongly drawn to yellow. Place yellow sticky cards horizontally, just above the soil surface (horizontal placement near the soil catches far more gnats than a card standing upright). One trap per affected pot.

Traps do two jobs: they remove egg-laying females before they can restock the soil, and they act as a population meter. When a fresh trap stays nearly clean for a week, you've won.

3. BTI soil drench for the larvae

3

BTI (Bacillus thuringiensis israelensis) is a naturally occurring soil bacterium that is lethal to fungus gnat and mosquito larvae and harmless to plants, pets, and people. It's sold as Mosquito Bits, Mosquito Dunks, and Gnatrol.

Soak about 4 tablespoons of Mosquito Bits per gallon of water for 30 minutes to overnight, strain, and use that water for your normal watering. Repeat with every watering, or at least weekly, for 3 to 4 weeks. That window covers a full life cycle, so larvae from every egg batch hit the BTI as they hatch. This is the treatment that makes results permanent rather than temporary.

4. A half-inch layer of sand or fine gravel on top of the soil

4

Adult females need moist organic material to lay eggs in. A half-inch top layer of coarse sand, fine gravel, or horticultural grit dries almost instantly after watering and contains nothing for larvae to eat. Females either give up or lay eggs that hatch into larvae with no food at the surface. This is a cheap, one-time physical barrier that also makes the pot look tidier. It works best combined with bottom-watering, since top-watering through sand can eventually mix it into the soil.

5. Switch to bottom-watering

5

Set the pot in a tray of water for 15 to 30 minutes and let the soil wick moisture up through the drainage holes, then remove it and let the tray drain. The root zone gets fully hydrated while the top inch or two of soil, the only part gnats can use, stays dry. Bottom-watering plus a sand top layer makes a pot essentially uninhabitable for fungus gnats while keeping the plant perfectly happy.

6. Hydrogen peroxide drench for a quick knockdown

6

Need faster relief? Mix 1 part 3% hydrogen peroxide with 4 parts water and pour it through the soil when the plant is due for a watering. The solution fizzes as it contacts organic matter and kills larvae and eggs on contact, then breaks down into water and oxygen.

Treat this as a one-time reset, not a routine. Repeated peroxide drenches can damage roots and wipe out beneficial soil microbes. Knock the population down with peroxide, then let BTI and dry soil keep it down.

7. Repot in fresh mix for severe cases

7

If a pot is so infested that larvae are visible wriggling on the surface, or the plant is clearly declining, skip the incremental steps. Unpot the plant, shake off as much of the old soil as you can into a sealed trash bag (do not compost it and never reuse it), rinse the root ball, and repot into fresh, sterile mix in a clean pot. Add a sand top layer and water with BTI solution for the first few waterings. This removes the entire resident population in one move.

Treat every pot at once. Fungus gnats fly, weakly, but well enough to hop from a treated pot to an untreated one three feet away. If one plant has gnats, assume every pot in the room is a potential nursery. Apply the drying schedule and BTI drench to all of them at the same time, or the survivors will simply relocate and reinfest.

A Simple 3-Week Treatment Plan

WhenWhat to do
Day 1Confirm gnats (tap test, potato test). Place horizontal yellow sticky traps at every pot. Remove dead leaves and debris from soil surfaces. Optional: one hydrogen peroxide drench (1:4 with water) on the worst pots.
Week 1Stop all surface watering. Water only when the top 2 inches are dry, using BTI-soaked water. Add a half-inch sand or grit layer to affected pots.
Week 2Continue BTI with every watering. Switch to bottom-watering where practical. Replace full sticky traps. Adult numbers should be dropping noticeably.
Week 3 to 4Keep the BTI drench going one more cycle to catch late hatchers. If a fresh trap stays clean for a week, the infestation is over. If a pot is still producing gnats, repot it in fresh mix.

Keep Fungus Gnats From Coming Back

Once the flies are gone, a few habits keep them gone:

  • Keep the drying interval. The watering schedule that ended the infestation is the same one that prevents the next one. If the top 2 inches never stay wet, gnats can't establish.
  • Never reuse infested soil. Old mix from a gnat-ridden pot is full of eggs and pupae. Bag it and bin it.
  • Store potting mix sealed and dry. An open bag of damp mix in a garage is a gnat hotel. Clip it shut or move it into a lidded bin, and consider watering newly potted plants with BTI for the first few weeks as insurance.
  • Quarantine new plants for 2 to 3 weeks. Nursery pots are the most common way gnats enter a home. Keep newcomers in a separate room and watch the soil before they join the collection.
  • Keep soil surfaces clean. Fallen leaves and flower debris decaying on the soil are larva food. Tidy them off when you water.
  • Empty saucers after watering. Standing water keeps the pot base and lower soil wet and humid, exactly what gnats want.
Not sure what plant you're dealing with? Knowing the species tells you how dry it can safely go between waterings, which is the backbone of gnat prevention. A thirsty fern and a drought-loving snake plant need very different schedules. Use our free plant identifier to get an instant ID and care baseline.

Identify Your Plant →

Frequently Asked Questions

Why is my plant attracting gnats?

The gnats are after your soil, not the plant. Fungus gnats lay eggs in consistently moist potting mix, and the larvae feed on fungus and decaying organic matter in the top few inches. Damp surface soil is the entire attraction. Let the top 2 inches dry between waterings and the pot stops being a breeding site.

Are the tiny flies on my plants fruit flies or fungus gnats?

Watch where they hang out. Flies rising from the pot and walking on the soil are fungus gnats: dark, slender, mosquito-like, weak fliers. Flies circling fruit, trash, or the sink are fruit flies: rounder, tan, often red-eyed, and completely uninterested in soil. Soil treatments only work on fungus gnats; kitchen cleanup only works on fruit flies.

How do I get rid of fungus gnats permanently?

Dry the top 2 inches of soil between waterings, trap adults with horizontal yellow sticky cards, and drench the soil with BTI (Mosquito Bits) weekly for 3 to 4 weeks to kill larvae. Add a half-inch sand top layer and bottom-water to block future egg-laying. That combination breaks the life cycle rather than just thinning the adults.

Do fungus gnats damage houseplants?

Adults are harmless. Larvae mostly eat fungus and decaying matter, but in heavy infestations they also chew fine roots, causing yellowing, wilting, and stunted growth. Seedlings and cuttings are at real risk; established plants usually just look tired until the larvae are dealt with.

Does hydrogen peroxide kill fungus gnats in soil?

Yes. A drench of 1 part 3% hydrogen peroxide to 4 parts water kills larvae and eggs on contact and is a good same-day knockdown. It won't stop reinfestation on its own, so follow it with dry-out intervals and BTI, and don't repeat peroxide drenches often, since they can harm roots and soil microbes.

Why do fungus gnats keep coming back?

Either the soil went back to staying moist, an untreated pot in the house is reseeding the population, or an infested bag of potting mix keeps reintroducing larvae. Treat every pot in the room simultaneously, store mix sealed and dry, quarantine new plants, and never reuse soil from an infested pot.

Related reading: Common Houseplant Pests: Identify, Treat, and Prevent Every One · Overwatered vs. Underwatered Plants: How to Tell the Difference

Related Articles

Common Houseplant Pests Spider mites, mealybugs, scale, thrips, and more, learn to ID and treat every common pest. Overwatered vs. Underwatered Plants Yellow leaves, drooping, brown tips, learn to diagnose and fix both problems. Houseplant Care Guide for Beginners Everything you need to keep your first plants alive, watering, light, soil, and more.

- Know your plants 🌿 -

Upload a Photo