How to Get Rid of Fungus Gnats: The Tiny "Fruit Flies" in Your Plant Soil

How to Get Rid of Fungus Gnats: The Tiny "Fruit Flies" in Your Plant Soil

Updated November 2026 by Zeba Parkar

Quick answer: Tiny dark flies hovering around your houseplant soil are almost always fungus gnats, not fruit flies. They lay eggs in damp potting soil, and their larvae live in the top couple of inches. To get rid of them, let the top 1–2 inches of soil dry out, don't let the pot sit in runoff, catch adults with yellow sticky traps, and treat the soil with Bti (Mosquito Bits) or beneficial nematodes. Keep it up for 3–4 weeks to break the life cycle.

Gnats breed in soil that stays damp. Our Tera Sausr holds the pot up above the water that drains out, so the soil isn't sitting wet and dries out sooner between waterings.

Fruit flies or fungus gnats? How to tell

What you see Where they hang out What it is What to do
Tiny dark, long-legged flies that look like mini mosquitoes; weak, zigzag flight On the soil, rising when you water; near windows Fungus gnats Follow the plan below
Tan or brown flies with red eyes and a rounder body Fruit bowl, compost, trash or sink drain, not the soil Fruit flies Remove ripe fruit and scraps; a cider vinegar trap works well
Stout, dark flies with short antennae and faint white spots on the wings Very wet soil, or green algae on the soil surface Shore flies Same as gnats: let the soil dry and scrape off algae
Thin, tiny insects (1–2 mm) on leaves, not flying around the soil Leaves with silvery patches and black specks Thrips See fungus gnats vs thrips

Not sure? Put a cider vinegar trap next to the fruit bowl and a yellow sticky trap in the pot. Fruit flies go for the vinegar. Fungus gnats end up on the yellow trap.

What are fungus gnats?

Fungus gnats are small flies, about 1/8 inch long, mostly Bradysia species. Adults don't bite and only live about 7–10 days, but each female can lay up to 200 eggs in moist soil.

The eggs hatch in about 3–6 days. The larvae are clear and wormlike with a shiny black head, and they live in the top 2–3 inches of soil, feeding on fungi, algae and decaying matter, and sometimes young roots. It takes about 3–4 weeks to go from egg to adult, and the generations overlap. That's why one round of treatment rarely works.

Are they harmful? Mostly they're a nuisance. In large numbers, the larvae can damage the roots of seedlings, cuttings and young plants.

Satin pothos climbing a wooden Treleaf trellis
Satin pothos on a Treleaf trellis

Where do fungus gnats come from?

  • Soil that stays wet: overwatering, a pot sitting in runoff, heavy peat-based soil, or pots without drainage holes.
  • Bagged potting soil: open bags stored damp, or bags that already carry eggs.
  • New plants, and plants coming back inside after a summer outdoors. Warm homes let their numbers jump. See bringing plants indoors for winter.

They're most common in fall, when plants come in, and from late winter into spring.

How to get rid of fungus gnats: a 3–4 week plan

Go after the adults and the larvae at the same time, and keep going for a full month.

Step 1: Let the soil dry out

Let the top 1–2 inches of soil dry between waterings. Most tropical houseplants are fine with this; check with a finger before you water. Dry topsoil means new eggs and larvae can't survive. More in how often to water houseplants and signs of overwatering.

Step 2: Don't let the pot sit in water

In a regular saucer, the bottom of the pot sits in the runoff and the soil wicks it back up, so it stays wet. Tip that water out after watering. Or use a saucer that holds the pot up above the runoff, like Tera Sausr or Lili Sausr: the pot isn't sitting in water, so there's nothing to empty. See also how to stop plant saucers from leaking.

Step 3: Trap the adults

Push yellow sticky traps into the soil or hang them just above it. Swap them when they fill up. They also show you which plants have the most gnats.

Step 4: Kill the larvae in the soil

Pick one of these:

  • Bti (Mosquito Bits, Gnatrol): a bacteria that kills fly larvae and is low risk to plants, people and pets when used as labeled. Soak the bits in water as the label says and use that water every time you water, for 3–4 weeks.
  • Beneficial nematodes (Steinernema feltiae): microscopic worms that hunt the larvae. Water them in as the package says, and keep the soil lightly moist while they work.
  • Hydrogen peroxide: a common home method. Mix 1 part 3% hydrogen peroxide with 4 parts water and use it as a soil drench. Try it on one plant first; it's harsher on soil life than Bti.

Step 5: Cover or replace the top layer

Scrape off the top inch of soil and replace it with fresh mix, or add a half-inch to 1-inch layer of coarse sand or horticultural grit, so adults can't reach the damp soil to lay eggs.

Step 6: Repot badly infested plants

If a plant stays soggy or the soil is full of larvae, shake off the old soil and repot it in a fresh, airy mix like Houseplant Chunky Mix, in a pot with drainage holes. Plants from big box stores often come in dense soil that stays wet. Keep the other steps going after repotting, since some larvae can stay in the root ball. More on soil in the best potting soil for houseplants.

Houseplants being repotted into fresh potting mix
Repotting into fresh mix
Photo by vadim kaipov on Unsplash

How to check it's working: you'll see fewer gnats on the sticky trap each week. When a fresh trap stays clean for a week or two, you're done.

Bottom watering and fungus gnats

Bottom watering keeps the soil surface drier, which gnats don't like. Set the pot in water for 15–30 minutes, let the soil take up what it needs, then let it drain. More in the pros and cons of bottom watering.

A deep saucer makes bottom watering easy without hauling plants to the tub. Our Mia bottom watering saucer holds about an inch of water, so roots drink from below while the top of the soil stays dry.

What doesn't work well

  • Cider vinegar traps: great for fruit flies, weak for fungus gnats.
  • Cinnamon on the soil, or watering less for just a week: little evidence they work on their own, and they don't reach the larvae already in the soil.
  • Spraying the leaves: gnats breed in the soil, so leaf sprays miss the larvae.

How to prevent fungus gnats

  • Water when the top inch or two is dry, not on a schedule.
  • Don't leave a pot sitting in runoff: empty a regular saucer, or raise the pot above the water with Tera or Lili.
  • Use a well-draining mix and pots with drainage holes.
  • Store potting soil sealed and dry, and check new plants and plants coming in from outside.
  • Leave a yellow sticky trap in plants that had gnats before, as an early warning.

Shop the fix

Gnats need damp soil. Let it dry out between waterings and the cycle breaks.

Shop Tera

Frequently Asked Questions

Are the tiny flies in my plants fruit flies?

Usually not. Flies that hover around the soil and rise when you water are fungus gnats. Fruit flies stay near fruit, trash and drains. Use the table above to tell them apart.

Do fruit flies lay eggs in plant soil?

Not usually. Fruit flies breed in fermenting fruit and sugary residue. Flies breeding in potting soil are fungus gnats, or shore flies in very wet soil.

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

About 3–4 weeks of steady treatment, because eggs, larvae and adults overlap. You should see fewer adults within a week or two.

Can fungus gnats come from bagged potting soil?

Yes. Store soil sealed and dry. If a new bag has flies in it, let it dry out before using it, or return it.

Will changing the soil get rid of gnats?

It helps a lot, but keep the sticky traps and dry-soil steps going, since some larvae can stay in the root ball.

Are fungus gnats harmful to plants?

Mostly they're a nuisance. Large numbers of larvae can damage the roots of seedlings, cuttings and young plants.