Fungus Gnats: How to Identify and Get Rid of Them

Fungus gnats are small dark flies, about 1/8 inch long, that hatch from larvae living in constantly damp potting mix. If you see them drifting around a houseplant or hopping across the soil, the pot is staying wet too long. The fix has two sides. Dry out the top layer of soil so the larvae die, and trap or kill the adults while you wait. Most infestations clear in three to four weeks with steady effort.

Yellow sticky trap in a houseplant pot with small dark fungus gnats on the soil surface

Free plant identifier: scan a plant photo

Get the likely plant name, care basics, pet safety and what to check next.

Telling Fungus Gnats From Fruit Flies and Other Tiny Flies

The adults are what you notice first. They are slender, dark gray to black, and about 1/8 inch long, with long legs and long antennae. They are poor fliers. Instead of darting around, they hop, drift and walk across the soil, and they collect on windows and around lamps. Water the plant and a small puff of them often lifts off the surface.

The fungus gnats vs fruit flies question comes up constantly, because both are tiny and both turn up in kitchens. Where you see them is the best clue. Fruit flies are tan or brownish, stockier, often red-eyed, and they hover over ripe bananas, the compost bin and the sink drain. Gnats stay close to plant pots.

InsectLooks likeUsually foundGiveaway
Fungus gnatSlender, dark gray to black, long legs, about 1/8 inchPlant pots, nearby windowsWeak flier that hops or runs on soil
Fruit flyStocky, tan to brown, often red eyesRipe fruit, trash, drainsHovers over food, flies quickly
Phorid flyHumpbacked, tan to blackDrains, compost, rotting matterRuns in fast, jerky zigzags
Shore flyStout, dark gray, pale spots on wings, short antennaeAlgae on wet soil, hydroponic setupsStrong flier, green algae film nearby

To be sure, lay a slice of raw potato on the soil for a day or two and lift it. Larvae gather underneath. They are translucent white, up to 1/4 inch long, with a shiny black head. A yellow sticky card pushed into the pot also settles the question fast. If you can get a clear close-up of whatever is stuck to it, our guide to identifying plant pests from a photo shows how to confirm tiny insects.

Why You Keep Getting Fungus Gnats in Your Houseplants

Fungus gnats don't care how clean your home is. They are looking for moist, organic soil where larvae can eat fungi and rotting plant matter, and a typical potted plant is exactly that. Adults are also drawn to light and to the carbon dioxide that damp soil gives off.

The usual causes are easy to spot once you know them.

  • Watering on a schedule instead of when the soil needs it, so the top inch never dries.
  • Pots with no drainage hole, or a saucer that sits full of water.
  • Dense, peat-heavy mix that holds water for a week or more.
  • Dead leaves, old flower petals or fertilizer crust sitting on the surface.
  • A new plant or bag of soil that arrived with eggs already in it.
  • Plants moved outside for summer, then brought back in.

Low light makes everything worse, because plants in dim rooms use water slowly and the pot stays soggy. A plant light meter app can show whether a shady corner is part of the problem. Soil that stays wet this long is also the setup for rot, so if the plant looks droopy as well, compare the symptoms in our guide to root rot vs overwatering.

The Life Cycle That Makes Adult-Only Treatment Fail

Spraying the flies you can see feels productive and changes almost nothing. At any moment most of the population is hiding in the pot as eggs, larvae and pupae.

A female lays up to about 200 eggs in cracks and crevices in the soil surface. At normal room temperatures of 70 to 75°F the eggs hatch in 4 to 6 days. The larvae feed for roughly 10 to 14 days, then pupate in the soil for another 3 to 7 days. Adults live about a week, mate quickly and start laying. One generation takes around three to four weeks, and cooler rooms slow it down. Because of that overlap, you will see new adults for weeks after you start treating the soil, and that is normal.

Damage depends on the plant. Larvae feed mostly on fungi and decaying material, so a mature pothos or snake plant usually shrugs them off. Seedlings, fresh cuttings and stressed plants are different. Larvae chew fine roots, and the University of California's IPM program lists young plants and propagation trays as the places where they do real harm. The adults do not bite people or pets. They are an annoyance, not a health risk.

How to Get Rid of Fungus Gnats in Four Steps

Here is how to get rid of fungus gnats without damaging the plant. Do all four steps together. Any single one is slow.

  1. Let the soil dry. Water only when the top 1 to 2 inches feel dry, and for succulents wait until the whole pot is dry. This is the step that kills larvae, because they need moisture to survive. Empty saucers after 30 minutes.
  2. Trap the adults. Push yellow sticky cards flat against the soil or just above it, one per pot for small plants. Replace them weekly. Cards cut egg-laying and tell you whether you are winning.
  3. Kill the larvae in the soil. The most reliable product is Bti, short for Bacillus thuringiensis subspecies israelensis, a bacterium that only harms fly larvae. Mosquito Bits or Gnatrol both work. Steep the bits in water for about 30 minutes, then use that water to drench the pot once a week for four weeks, long enough to cover a full life cycle.
  4. Cap the soil. Spread about 1 inch of coarse sand, fine gravel or poultry grit on top. The dry layer makes it hard for females to lay eggs, and it keeps the surface from staying damp.

Beneficial nematodes (Steinernema feltiae) are a good option if you have many plants. They arrive live, get mixed into water and poured over the soil, and they need the mix to stay slightly moist and between roughly 60 and 85°F. Predatory soil mites work too, but are harder to find.

If a pot is badly infested and the plant is small, repotting into fresh, fast-draining mix after removing the top inch or two of old soil can reset things. Timing and technique are covered in our guide to when to repot plants. Rinse the roots gently and discard the old mix outdoors, not in the compost bin you keep near the plants.

Dawn Soap, Hydrogen Peroxide, Cinnamon and Neem Compared

What do fungus gnats hate most? Dry topsoil. Nothing in a spray bottle beats it. Still, a few home remedies earn a place, and a few waste your time.

RemedyStage it hitsHow well it works
Yellow sticky cardsAdultsGood for catching and monitoring, does not clear larvae
Bti drenchLarvaeBest single treatment, needs about four weekly doses
Dish soap and vinegar trapAdultsDecent near the plant, cheap
Dish soap in the soilLarvaeNot recommended, can injure roots
3% hydrogen peroxide drenchLarvae on contactShort-term rescue, does not fix wet soil
Neem soil drenchLarvaeSlower and less certain than Bti
Cinnamon on the surfaceFungi, maybe eggsHarmless, little proof it helps

Does Dawn soap kill gnats? It does on contact, but adults fly off before you can spray them. The smarter use is a trap. Fill a shallow dish with apple cider vinegar and a drop of dish soap, set it beside the pot, and the soap breaks the surface tension so flies that land go under. Pouring soapy water into the pot is a different story, because it can strip the protective coating from fine roots.

Hydrogen peroxide is the one people ask about most. Mix 3% peroxide with water at about 1 part to 4 parts and soak the soil. It fizzes, kills larvae it touches, and breaks down into water and oxygen within minutes. It will not reach every egg or larva, and stronger mixes can burn fine roots, especially on seedlings. Treat it as a one-time rescue while you fix the watering, not a weekly routine.

Cinnamon is a mild antifungal and will not hurt the plant, but I have not seen solid evidence that it controls gnats. Neem is reasonable if you already own it. Put your money into Bti and cards first.

Does Bagged Potting Soil Come With Fungus Gnats?

It can. Miracle-Gro potting mixes are among the most widely sold in the U.S., so they show up in many gnat complaints, but the brand is not the real issue. Any bagged mix with peat, bark or compost can carry eggs, or become infested after the bag is opened. Fungus gnats can ride in on a new plant just as easily, and nurseries keep their benches wet, which is why a plant that looked fine at the store may start producing flies in week two.

You cannot guarantee a gnat-free bag, but you can lower the odds.

  • Reseal opened bags tightly and store them somewhere cool and dry, not in a damp garage.
  • Look for flies or tiny white larvae when you pour the mix out.
  • Cut dense mixes with perlite or pumice, around one third by volume, so the pot drains and dries faster.
  • Keep new plants away from your collection for two weeks and put a sticky card in each pot.
  • Water new plants once with a Bti solution as a precaution, especially if you are propagating or starting seeds.

If you buy a plant and cannot tell what it is or how much water it likes, get that sorted early. A species that wants to dry out between drinks needs very different treatment from a fern that likes constant moisture.

Keeping Gnats From Coming Back

Once the flies are gone, the habits that let them in are still sitting there. Prevention is mostly about water.

Check the soil with a finger or a wooden skewer before watering, and skip the calendar. If you forget often, a plant watering reminder app can prompt you to check on the right days, though it should nudge you to test the soil, not water automatically. Bottom watering helps because the surface stays dry while the roots drink. Pour out any water left in the saucer after about 30 minutes.

Pick up fallen leaves, flowers and old fertilizer crust. Use pots with drainage holes and a mix that suits the plant. Cacti and succulents want gritty mix, while tropicals like monstera or pothos do better with bark and perlite added to a peat-based blend. Knowing what you are growing sets the watering rhythm, so if the tag is long gone, upload a photo to the scanner at the top of this page or use a tool that can name the plant from a photo and give care basics.

Finally, leave one sticky card in a few of your more vulnerable pots all year. A single fly on the card in March is a much easier problem than a cloud of them in June.

When Gnats Keep Returning Despite Your Best Efforts

If flies are still landing on cards after six weeks of drying and Bti, something is feeding them. Check for a pot that never dries because it is too large for the root ball, a saucer or decorative cachepot hiding standing water, or rotting roots. Slide the plant out and look. Healthy roots are firm and pale. Brown, mushy ones need cutting back, and the soil needs replacing.

Also look at the plant. Yellowing, stunting or wilting that continues while the soil is moist points to root stress, and gnats are the symptom rather than the cause. For more on what slow-drying soil can do, the University of Minnesota's extension service publishes houseplant and pest guides covering moisture management. If you spot fine webbing, stippled leaves or sticky residue instead of flies, you are dealing with a different pest, and our page on spider mites on plants will help you check.

Gnat Questions People Keep Asking

Why do I attract fungus gnats?

It has nothing to do with cleanliness. Adults look for damp, organic potting mix to lay eggs, so overwatering, slow-draining soil, low light and decaying leaves on the surface all draw them in. Gnats can also arrive in a bagged mix or on a newly bought plant.

Does Dawn soap kill fungus gnats?

Dish soap kills adults it touches, but they fly off before most sprays land. It works better as a trap, mixed with apple cider vinegar in a shallow dish beside the plant. Avoid pouring soapy water into the soil, since it can damage roots.

Does hydrogen peroxide really kill fungus gnats?

It kills larvae it contacts. Use 3% peroxide diluted about 1 part to 4 parts water and soak the soil once. It does not fix the wet conditions that caused the problem and stronger mixes can burn roots, so pair it with drier watering and Bti.

Does Miracle-Gro potting soil have fungus gnats?

It can, as can any bagged mix containing peat, bark or compost. Eggs may be in the bag or arrive after it is opened and stored somewhere damp. Seal the bag, store it dry, and blend in perlite so the pots drain quickly.

What is the best way to get rid of fungus gnats?

Combine dry soil, yellow sticky cards and a weekly Bti drench for about four weeks. The drying and Bti kill larvae, while the cards trap adults. A 1 inch layer of sand or grit on top helps stop new eggs.

How long do fungus gnats last?

One life cycle takes roughly three to four weeks at room temperature, so expect flies to keep appearing for that long even after you start treatment. If you still see adults after six weeks, look for soil that is not drying, standing water or rotting roots.