How to get rid of fungus gnats

Quick answer

The flies are the nuisance. The larvae in wet soil are the problem. Dry the top inch first, then treat the larvae.

Small dark flies that rise out of the soil when you water and settle back on it are fungus gnats. They are about 3 mm long, slender and long legged, and they stay low around the pot instead of circling the fruit bowl. The flies do no harm themselves. Their larvae do the damage: tiny clear worms with a shiny black head that live in the top inch or two of wet potting mix. So the first thing to do is stop that layer staying wet. Water only once the top inch feels dry, and tip out any water standing in the saucer or cachepot. Then push a yellow sticky card in low over the soil to count the flies.

How to tell it is fungus gnats

Adult fungus gnats are dark gray to black flies, mostly 3 to 4 mm long, with long legs and long, thin antennae. They are weak fliers. You see them walk across the soil, hop up when the pot is moved and flutter around the nearest window.

The larvae are the stage to look for. They are up to 6 mm long, legless, white to almost see-through, with a shiny black head, and they live in the top few centimeters of the mix. In very wet pots you may see thin slime trails on the surface.

To check a pot, press a slice of raw potato cut side down onto the soil and lift it after two or three days. Larvae that have moved to the underside show up as small clear worms with black heads.

Flies that look similar:

  • Fruit flies are tan with red eyes, rounder, and gather around ripe fruit, bins and drains, not around pots. Our fungus gnats vs fruit flies guide shows the difference side by side.
  • Shore flies are sturdier, with short antennae, and breed in algae on constantly wet surfaces. They point to the same problem: a surface that never dries.
  • Springtails are wingless, gray or white, and jump when you water. They live in the mix too and do not harm plants. See springtails in soil.
  • Whiteflies sit on the undersides of leaves and rise in a white cloud when you touch the plant. That is a different pest: whiteflies on houseplants.

Look at

  1. 01Small dark flies rising from the soil when you water
  2. 02Whether they stay low over the soil, not on fruit or leaves
  3. 03Clear larvae with black heads under a potato slice
  4. 04How wet the top inch of soil is
  5. 05Whether seedlings, cuttings or fresh repots are involved
The dry top layer of soil in a pot with damper soil below
Dry on top and still damp below is where the eggs sit

Why your plants have them

Fungus gnats need a damp surface rich in organic matter. Females lay their eggs in the top layer of the mix, up to 200 each, and the larvae feed on fungi, decaying material and fine roots there.

The usual causes:

Gnats that keep coming back almost always mean one pot in the room is still wet enough for them to breed.

  • The top of the soil never dries. Watering on a schedule, a deep saucer or a cachepot holding water keeps the surface wet. This is the most common reason.
  • Autumn and winter. Less light and cooler rooms mean the mix dries more slowly, while the watering habit stays the same. Gnats often appear in October for that reason.
  • A new bag of potting mix. Bags stored open or outdoors can already hold eggs and larvae. A new plant can bring them in its pot as well.
  • Mixes heavy in compost or peat. They hold water and food for longer.
A yellow sticky card pushed into the soil of a pot
The card sits low over the soil, where the insects fly

Step by step: from gentlest to strongest

Work down the list and stop where the counts on your sticky cards fall. Treat every pot in the room, because the flies move between them.

  1. 1

    Step 1. Let the top inch dry before you water again. Push a finger an inch or two into the soil. If it still feels damp, wait. Lifting the pot right after watering and again a few days later tells you more than looking at the surface. Tip out water standing in the saucer or cachepot after half an hour. A dry surface reduces survival of eggs and young larvae and attracts fewer egg-laying females. Numbers often fall, but keep monitoring the pots.

  2. 2

    Step 2. Water from below if the plant cannot dry out. Seedlings, ferns, calatheas and other plants that need even moisture get their water through the saucer. Fill it, let the pot drink for 20 to 30 minutes, then pour the rest away. The roots get water and the surface stays drier. See bottom watering plants.

  3. 3

    Step 3. Put up yellow sticky cards. Push them in low over the soil, where the flies travel. They catch egg-laying females, but their real job is the count: if fewer flies stick to each card from week to week, the rest of the plan is working. On their own they never end an infestation.

  4. 4

    Step 4. Treat the larvae with a suitable Bti product. Bacillus thuringiensis israelensis can control fungus-gnat larvae in potting mix. Use only a product whose label covers fungus gnats in indoor plant soil, and follow its preparation, dose and repeat interval. A mosquito product is not automatically suitable for this use. Bti does not control the flying adults, so keep the sticky cards up.

  5. 5

    Step 5. Or use nematodes. Steinernema feltiae are microscopic roundworms that enter the larvae. Store, mix, dose and repeat them as the supplier directs. Keep the mix from drying out, without waterlogging it, and follow the supplier’s substrate-temperature range. Kansas State University reports greatest effectiveness at about 15 to 26 °C (59 to 79 °F) in the growing medium. Choose per pot whether to let the surface dry or keep it from drying for the nematodes. Doing both at once does not work.

  6. 6

    Step 6. Cover the surface. A layer of coarse sand, fine grit or clay pebbles across the whole surface, out to the rim, dries fast and makes egg laying harder. It helps many growers, but trials disagree on how much, so treat it as support for steps 1 to 5, not as the treatment.

  7. 7

    Step 7. Repot into fresh mix. If a pot stays infested after several weeks, shake as much old mix off the roots as the plant tolerates and repot into fresh, dry-stored houseplant mix in a clean pot. Bin the old mix rather than reusing it. Leave a weakened plant until it has recovered.

  8. 8

    Step 8. Last resort: a spray for the adults. A pyrethrin spray whose label names houseplants knocks the flying adults down fast, but only for a while, because the next generation is still in the soil. Use it only alongside steps 1 to 5.

What to do now

Water only once the top inch is dry, empty the saucer, put up yellow cards and treat the larvae with Bti or nematodes.
Mr. Kitty watering nematodes into damp soil from a watering can
Nematodes go in with the water, evenly across the damp soil

Home remedies: what works and what does not

Hydrogen peroxide. We do not recommend a homemade peroxide soil drench. The cited extension guidance supports watering changes, nematodes and suitable labeled products, but does not establish the effectiveness and plant safety of the proposed peroxide dilution.

Neem drenches. Use neem as a soil drench only if the label explicitly covers fungus gnat larvae, indoor ornamental plants and watering the growing medium. Follow its dose and repeat intervals. If that use is absent from the label, choose another method.

Diatomaceous earth on top works only while it is dry, and the surface of a pot you water is rarely dry for long.

Matches pushed into the soil are the best known tip. No extension or plant protection service lists them, and there is no evidence they reach the larvae.

Cinnamon may slow mold on the surface. It does nothing measurable to larvae.

Dish soap in the watering can harms the roots more than the larvae.

Apple cider vinegar traps catch fruit flies well and fungus gnats poorly, because gnats are not drawn to fruit.

Coffee grounds keep the surface damp and add organic matter, which is what the larvae live on.

Carnivorous plants catch the odd fly and have no effect on the population in the pots.

A layer of sand spread over the soil in a pot
The sand layer covers the whole surface out to the rim

How long it takes

At about 24 °C (75 °F) a full generation, egg to egg-laying adult, takes around 17 days: eggs hatch in about 3 days, larvae feed for about 10, pupae need about 4. In a cooler room it takes closer to a month.

That is why every method needs time. Expect three to six weeks before the cards stay empty: long enough for the larvae already in the pot to die and for no new generation to follow. Fewer flies on the cards each week means you are on track. Flies still rising after six weeks mean one pot is still wet or untreated.

Are fungus gnats harmful?

Not to you or your pets. Fungus gnats do not bite or sting, do not breed in beds or food and live only about a week as adults.

For plants it depends on age. A strong, rooted houseplant barely notices them. Seedlings, cuttings and freshly repotted plants can stall, wilt or topple when larvae eat their fine roots. Wilting in an older plant is more often overwatering or root rot than gnats. See how to fix an overwatered plant and root rot in houseplants.

How to keep them from coming back

Water by feel, not by date, and check again each autumn when growth slows.

Use pots with drainage holes and never leave water standing in a cachepot. See drainage holes for plants.

Buy undamaged, dry-stored bags of mix and close opened bags between uses. Mixes with more sand, pumice or perlite dry faster on top.

Keep a new plant apart for a few weeks and look at its soil surface when you water.

Pick up fallen leaves and spent flowers from the soil.

Leave one yellow card in a pot that had gnats. It tells you about a new generation before you see flies in the room.

When to throw out the soil or the plant

Throw out the old mix whenever you repot an infested plant. It goes in the bin, not into another pot.

The plant itself rarely needs to go. Consider it only for cheap, easily replaced plants that stay heavily infested after six weeks of treatment and keep reinfesting the rest, or for seedlings and cuttings whose roots are already eaten.

Checking a new or gifted plant

New plants and new bags of potting mix are the usual way fungus gnats arrive. Check the pot before it stands with your other plants.

Lift the plant and look at the soil surface and the drainage holes. Small dark flies that rise when you move the pot, slime trails on the mix or clear larvae with a shiny black head mean gnats are already there.

Press a slice of raw potato onto the soil and lift it after two or three days. Push a yellow sticky card in low over the soil and leave it there for the first few weeks.

Feel the top inch of the mix. If it is wet, let it dry as far as that plant tolerates before you water it again, and keep the plant apart from the others for two to four weeks.

Close an opened bag of potting mix after use and store it dry. Mix with flies or larvae in it does not go into your pots.

When to look again

Count the flies on each card once a week, on the same day, and replace a card when it is full. Lift the potato slice after two or three days and lay a fresh one if you found larvae. Feel the top inch of every pot in the room before each watering.

Expect three to six weeks. Fewer flies on the cards each week means the plan is working. You are through when the cards stay empty at two weekly counts in a row and a potato slice comes up clean. Then leave one card in place as an early warning through autumn and winter.

If you use Botanicaly, “Ask about this plant” (Pro) lets you photograph the pot and ask about it. Botanicaly reads the photo together with the care details you saved for that plant, suggests possible causes and what to try first, and tells you when to check again. A photo cannot show larvae inside the mix and no app can promise a cure, so the cards and the potato slice remain the test. Everything on this page works without the app.

Related plants

Keep reading

Common questions

How do I get rid of fungus gnats fast?

Dry out the top inch of soil, empty saucers and cachepots, and treat the larvae with Bti or nematodes. Yellow sticky cards catch the adults meanwhile. Sprays for the flies only buy a pause, because the next generation is still in the soil.

Will fungus gnats go away on their own?

Allowing the surface to dry according to the plant’s needs often reduces fungus gnat numbers, but does not guarantee they disappear. Monitor the pots and use a suitable larval treatment if they persist. Repeatedly wet soil supports further breeding.

Do mosquito bits work for fungus gnats?

A Bti product can control fungus-gnat larvae if its label specifically covers that pest and application to indoor plant soil. Follow the label for preparation, dose and repeat interval. Do not substitute a mosquito-only product. Sticky cards are still useful for monitoring adults.

Does hydrogen peroxide kill fungus gnats?

We do not recommend a homemade peroxide drench because the proposed dilution lacks reliable evidence of effectiveness and plant safety. Use species-appropriate watering changes, S. feltiae nematodes or a Bti product labeled for fungus gnats in indoor plant soil.

Where do fungus gnats come from?

From eggs in damp potting mix: a bag stored open, a new plant, or a few adults that flew in and found a wet pot. They appear most in autumn and winter, when the mix dries more slowly.

Are fungus gnats harmful to people or pets?

No. They do not bite, sting or carry disease to people or pets. Seedlings, cuttings and fresh repots are most at risk, because the larvae eat their fine roots. A large population can damage older plants too.

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

Usually three to six weeks. A generation takes about two and a half weeks in a warm room and up to a month in a cool one, so the treatment has to outlast the larvae already in the soil.

Do I need to repot or throw out the soil?

Not at first. Drying the surface and treating the larvae clears most pots. Repot into fresh mix only if a pot is still infested after several weeks, and bin the old mix.

How do I check a new plant for fungus gnats?

Look at the soil surface and the drainage holes for small flies and clear larvae with a black head, press a potato slice onto the soil for two or three days and push a yellow card in low. Keep the plant apart for two to four weeks.

Last reviewed: