To get rid of gnats in potted plants, you have to deal with the soil, not just the flies. The tiny black insects drifting around your houseplants are almost always fungus gnats, and their larvae live in the top couple of inches of damp potting mix. Let that top layer dry out, catch the adults on yellow sticky traps, and treat the larvae with Bti if numbers stay high.

The adults are mostly a nuisance. They don't bite and don't feed on plants. The goal is to break the life cycle so new adults stop hatching.

Quick answer: Let the top 1 to 2 inches (2.5 to 5 cm) of mix dry before you water again, empty saucers, and water from the bottom if you can. Put yellow sticky traps at the edge of the pot to catch adults. If gnats persist, drench the mix with a Bti product labeled for fungus gnats, repeated every 5 to 7 days. Expect it to take 3 to 4 weeks.

Fungus gnats or fruit flies?

Check what you're dealing with first. University of Wisconsin–Madison Extension notes that fungus gnats are often confused with fruit flies, which are a different insect and need a different fix.

Fungus gnats are delicate, dark brown or black flies about 1/8 inch (3 mm) long, with long legs and antennae. Magnified, their wings show a distinct Y-shaped pattern of veins. They hang around the soil surface and fly up when you water or move the pot, while fruit flies tend to gather around fruit bowls and kitchen waste.

The larvae are the stage that matters. The RHS guide to fungus gnats describes them as slender, whitish, semi-transparent maggots up to 6 mm (1/4 inch) long with shiny black heads. You'll usually only see them if you look closely at the top layer of mix.

Do fungus gnats damage plants?

Usually not much. The RHS says adults do no damage, and the larvae mainly eat fungi and decaying plant material. Wisconsin Extension adds that larvae can damage roots at high numbers, but that's rare in homes. The exceptions are seedlings and cuttings: the RHS notes some species feed on seedling roots and tunnel into the base of soft cuttings.

The fungus gnat life cycle (and why it matters)

Every control method targets one stage of the cycle, so it helps to know how it runs.

Fungus gnat life cycle in a potted plant: eggs on the moist surface, larvae in the top 2 to 3 inches of mix, pupae, then adults Each stage lives in or on the top layer of the mix, which is why drying it out works.

According to Wisconsin Extension and Colorado State University's fungus gnat profile:

  • Eggs. A female lays up to 200 eggs on the moist soil surface. They hatch in 3 to 6 days.
  • Larvae. They usually live in the top 2 to 3 inches (5 to 8 cm) of mix and feed for one to two weeks, or around 20 days by Colorado State's count.
  • Pupae. Larvae pupate near the surface, and adults emerge about 4 to 5 days later.
  • Adults. They live roughly 7 to 10 days and start laying eggs again.

Egg to adult takes about 17 days to 4 weeks, depending on temperature, and generations overlap. That's why one round of anything rarely works. You need to keep the pressure on for at least a few weeks.

Why your potted plants have gnats

Fungus gnats need constantly moist mix with plenty of organic matter. Colorado State says moist media with a high peat moss content is especially attractive to egg-laying females, and that aging mix holds more moisture as it breaks down, which draws them in too.

The usual causes in containers:

  • Overwatering. The most common trigger. Wet mix on the surface is perfect for eggs.
  • Fall and winter. Colorado State points out that shorter days and cooler temperatures slow how fast plants use water, so the mix stays wet if your watering routine doesn't change.
  • Plants brought in from outdoors. Wisconsin Extension says fall infestations often start with houseplants that spent the summer outside.
  • Saucers of standing water and decaying leaves or roots on the mix.
  • A new bag of potting soil, covered below.

How to get rid of gnats in potted plants, step by step

Combine these steps. Any one on its own tends to fail, because each hits only part of the life cycle.

1. Let the top layer dry out

This is the single most useful change. Colorado State says to let the medium dry between waterings, especially the top 1 to 2 inches (2.5 to 5 cm), because drying the surface kills eggs and larvae. Wisconsin Extension gives the top inch (2.5 cm) as a minimum. Push a finger into the mix before you water.

Don't take it too far. North Carolina State Extension, quoted by the University of Washington's Miller Library, advises letting the soil dry down but not to the point where plants wilt. Ferns and other moisture lovers need a lighter touch than succulents.

2. Water from the bottom

Wisconsin Extension suggests bottom watering so the roots get moisture while the surface stays dry. Set the pot in a tray or sink of shallow water, let the mix soak it up through the drainage holes, then let it drain and empty the tray. Don't leave the pot sitting in water.

3. Trap the adults

Yellow sticky cards catch egg-laying adults. Colorado State suggests placing them at the edge of the container or under the plant canopy. Lay them flat on the mix or stand them on a stake just above it.

Traps alone won't clear an infestation. Colorado State says yellow traps on their own won't significantly reduce numbers, but they're very useful for showing whether your other steps are working. Fewer gnats on each new card means progress.

4. Treat the larvae with Bti

Bti (Bacillus thuringiensis subspecies israelensis) is a bacterium that kills fly larvae in the soil. Wisconsin Extension lists Bti products for fungus gnats and notes:

  • It affects only larvae, not eggs, pupae or adults.
  • Apply it as a soil drench with enough water to carry it down to the larvae.
  • Make several applications, 5 to 7 days apart.

Check the label before you buy. Colorado State warns that Bt products sold for caterpillars (a different subspecies) don't work on fungus gnats, and notes that Bti can be harder to find in ordinary garden stores. Follow the label for rates and for whether the product is approved for houseplants.

Tip: Beneficial nematodes (Steinernema feltiae) are another option for larvae. Both the RHS and Colorado State list them, applied as a drench to the mix. They're live organisms, so use them as soon as they arrive.

5. Top-dress with sand or fine gravel

Wisconsin Extension recommends covering the mix with a 1/2 to 1 inch (1.3 to 2.5 cm) layer of coarse sand or fine gravel, which keeps the surface dry where females lay eggs. Not everyone agrees: the Miller Library's answer doubts that sand on top helps much and warns it can form a crust that hampers drainage. If you try it, use coarse sand, keep the layer thin, and scrape it off if water starts to pool.

6. Repot if the mix is old or stays soggy

The RHS suggests repotting into fresh potting mix formulated for houseplants and discarding the old compost, which removes eggs and larvae. This is the fastest fix for a pot that never dries out. If you're tempted to save the old mix, read can you reuse potting soil first.

The potato slice test for larvae

A slice of raw potato tells you whether larvae are still active. Colorado State suggests pressing 1/4 inch (6 mm) slices of peeled potato into the surface of the mix. Larvae move to them within 24 to 48 hours. Wisconsin Extension suggests checking after three to four days.

Lift the slice and look on the underside and in the mix just below it for tiny clear worms with black heads. Test again a week after your last Bti treatment. No larvae on the slice and no new gnats on the traps means you're nearly done. Throw the slices away after each check so they don't rot in the pot.

Gnats in a new bag of potting soil

Sometimes gnats appear right after repotting, and the bag is the source. New Mexico State University Extension notes that fungus gnat problems may begin as eggs in new potting soil, and that a bag with a hole in it, or one that has been opened, may become infested.

To avoid it:

  • Keep bags tightly closed after opening and store them indoors.
  • UC IPM advice, quoted by the Miller Library, is to buy pasteurized container mix and store it in closed containers.
  • If a bag seems infested, NMSU suggests switching to a different brand next time.

Colorado State describes solarizing small amounts of soil: moisten it, seal it in a clear or black plastic bag no more than 8 inches (20.5 cm) deep, and leave it on a raised, sunny surface for 4 to 6 weeks. That only works in warm, sunny weather, so for a few pots it's often simpler to return or replace the bag.

What doesn't work well

Remedy Why it falls short
Sticky traps alone Catch adults only; larvae keep hatching in the mix
Vinegar or fruit fly traps Wisconsin Extension says they don't work for fungus gnats
Spraying insecticide into the air Wisconsin Extension calls airborne sprays ineffective
Caterpillar Bt products Wrong subspecies; Colorado State says they don't control gnats
One treatment, then stopping Overlapping generations mean you need 3 to 4 weeks
Drying the mix without changing the cause Gnats return once you go back to overwatering

Popular home remedies such as cinnamon sprinkled on the soil or hydrogen peroxide drenches don't appear in the extension guides cited here, so treat them as unproven. Wisconsin Extension says insecticides are usually unnecessary; for heavy adult numbers, pyrethrin products labeled for indoor plants give temporary control and should be combined with the steps above, always following the label.

If the bugs in your pots don't match this description, our guide to bugs in potted plant soil covers springtails, mites and other soil dwellers. White fuzz on a soggy surface is a separate problem, explained in fungus in indoor plant soil.

Chart showing which fungus gnat control methods affect eggs, larvae, pupae and adults Use at least one method for the soil stages and one for the adults.

Frequently asked questions

How long does it take to get rid of gnats in potted plants?

Plan on about 3 to 4 weeks. Wisconsin Extension says fall infestations may take that long with changed watering and a sand or gravel layer, because eggs and pupae already in the mix keep producing adults for a while. Keep traps out for a week or two after the last gnat to be sure.

Can fungus gnats kill my plant?

It's unlikely for an established plant. The RHS says established plants are unlikely to be harmed, though heavy larval feeding can damage seedlings and cuttings. If a plant is wilting in wet mix, check for root rot, which is caused by the overwatering rather than the gnats.

Are mosquito products with Bti safe to use on houseplants?

Wisconsin Extension lists some Bti products sold for mosquitoes as options against fungus gnat larvae. Check that the active ingredient is Bacillus thuringiensis israelensis and follow the label directions for use and rates.

Why do I only have gnats in winter?

In fall and winter, plants grow slowly and use less water, so the mix stays wet for longer if you keep watering on a summer schedule. Plants brought in from outdoors may also carry eggs and larvae. Water less often and check the mix with your finger first.