What Are Fungus Gnats? How to Identify, Prevent & Get Rid of Them

If you have ever noticed tiny black flies hovering around your potted plants, you are probably dealing with fungus gnats. They are one of the most common houseplant pests, and almost every plant owner runs into them at some point.
This guide explains exactly what fungus gnats are, how to recognize them, where they come from, and how to get rid of gnats in plants permanently.
Quick Answer: Fungus gnats are small black flies that live and breed in damp potting soil. Adults are mostly a nuisance, but larvae feed on soil fungi and can damage plant root hairs in large numbers. They appear when soil stays too wet and are harmless to humans and pets.
Key Facts About Fungus Gnats
| Fact | Detail |
|---|---|
| Size | Adults: 1/8 inch (2–4 mm) long |
| Appearance | Black or dark gray flies with long legs and antennae |
| Larvae | Translucent white worms with shiny black heads, up to 1/4 inch |
| Where they live | Top 2 inches of moist potting soil |
| What they eat | Soil fungi, decaying organic matter, weak root hairs |
| Lifespan | Adult lives about 7 days; full life cycle 3–4 weeks |
| Eggs per female | Up to 200 eggs in one lifetime |
| Harm to people | None — they do not bite, sting, or spread disease |
What Do Fungus Gnats Look Like?
Adult fungus gnats are slender, dark gray or black insects about 1/8 inch long with long legs, long antennae, and pale wings. One useful identifying detail is the Y-shaped vein pattern in the middle of each wing.
Fungus gnat larvae look completely different — small, worm-like maggots with almost clear, whitish bodies and shiny black heads. They grow up to 1/4 inch long and live just under the soil surface.
The potato test: Press a thick slice of raw potato onto the soil surface for a few hours. Larvae gather on the wet potato in visible clusters if your pot is infested.
Fungus Gnats vs Fruit Flies: Key Differences
Many gardeners confuse fungus gnats with fruit flies. Here’s how to tell them apart:
| Trait | Fungus Gnats | Fruit Flies |
|---|---|---|
| Color | Dark gray or black | Tan, amber, or brown with red eyes |
| Where they gather | Potting soil, damp spots | Fruit bowls, trash cans, drains |
| What attracts them | Damp soil and rotting plant matter | Sweet, fermenting scents |
| Flight style | Slow, hovering, circling soil | Quick, zigzagging around food |
| Best trap | Yellow sticky cards at soil level | Vinegar or fruit baits |
Identification tip: Fungus gnats are weak, slow fliers. If tiny flies seem to burst out every time you water a plant and flutter back down to the soil, they’re almost certainly fungus gnats, not fruit flies.
What Causes Fungus Gnats in Houseplants?
Fungus gnats usually enter a home through:
-
Infested potting soil. Bags of potting mix stored in damp garages or sheds can contain eggs and larvae. When you water the soil indoors, gnats hatch.
-
New plants. Nursery and garden-center plants are the most common carriers. Gnats breed in greenhouse trays before you bring them home.
-
Open windows. In warm months, adult gnats fly in through screens and windows.
What keeps an infestation going: Moisture. Fungus gnats need damp, decomposing soil to lay eggs and feed larvae. An overwatered plant with soggy peat moss is an open invitation, while a pot that dries thoroughly between waterings won’t support them.
Are Fungus Gnats Harmful to Plants?
In small numbers, fungus gnats are mostly a cosmetic nuisance. The larvae are the real concern — they eat organic matter and fungi in soil, and when populations grow large, they chew fine root hairs.
Signs of root damage from fungus gnat larvae:
- Leaves turn yellow
- Growth slows
- Plant looks wilted even though soil is damp
- Young seedlings and cuttings are most vulnerable
Fungus gnats do not harm humans, pets, or food. They carry no diseases and cannot bite.
How to Get Rid of Gnats in Plants: Step-by-Step
Step 1: Let Soil Dry Out
Fungus gnats need moist soil to breed. Allow the top 1–2 inches of soil to dry completely between waterings. This alone breaks the breeding cycle.
Step 2: Use Yellow Sticky Traps
Place yellow sticky cards at soil level to catch flying adults. This reduces egg-laying and gives you a visual measure of the infestation level.
Step 3: Apply BTI (Bacillus thuringiensis israelensis)
BTI is a naturally occurring bacterium that kills fungus gnat larvae without harming plants, pets, or beneficial insects. Available as mosquito dunks or granules:
- Crush one mosquito dunk and soak in 1 gallon of water for 30 minutes
- Water plants with the solution
- Repeat every 7–14 days for 3 weeks
Step 4: Hydrogen Peroxide Drench
Mix 1 part 3% hydrogen peroxide with 4 parts water. Water plants with this solution — it kills larvae on contact and oxygenates the soil. Repeat every 7 days.
Step 5: Sand or Diatomaceous Earth Barrier
Apply a 1/2-inch layer of coarse sand or food-grade diatomaceous earth on top of the soil. This creates a dry barrier that adult gnats cannot lay eggs through.
Step 6: Remove Organic Debris
Clear fallen leaves, dead plant material, and other organic debris from the soil surface. This removes food sources for larvae.
How to Prevent Fungus Gnats
Prevention is easier than treatment:
- Let the top of the soil dry out between waterings. Push a finger 1–2 inches into the pot and wait to water until it feels dry.
- Use pots with drainage holes so water never sits in the root zone.
- Bottom-water more often. Filling a tray lets roots pull up water while the top soil stays dry and unwelcoming to egg-laying adults.
- Store potting soil in sealed containers, never open bags in damp spaces.
- Quarantine new plants for 2–3 weeks in a separate room before placing them near your collection.
Natural Remedies for Fungus Gnats
| Method | How It Works | Effectiveness |
|---|---|---|
| Yellow sticky traps | Catches flying adults | Moderate |
| BTI (mosquito dunks) | Kills larvae in soil | High |
| Hydrogen peroxide | Kills larvae on contact | Moderate |
| Cinnamon powder | Antifungal properties | Low–moderate |
| Neem oil drench | Disrupts larval development | Moderate |
| Diatomaceous earth | Physical barrier on soil surface | Moderate |
| Sand barrier | Prevents egg-laying | Moderate |
How to Get Rid of Fungus Gnats in Seedlings
Seedlings are especially vulnerable because their delicate roots are easily damaged by larvae. For seedlings:
- Stop bottom-watering temporarily — let the surface dry between waterings
- Place yellow sticky traps at soil level
- Apply BTI solution at half-strength
- Improve airflow with a small fan
- If infestation is severe, repot seedlings in fresh, sterile seed starting mix
Frequently Asked Questions
Are fungus gnats harmful to humans or pets?
No. Fungus gnats do not bite, sting, or transmit diseases to humans or pets. They’re a nuisance that buzzes around plants, but the real risk they signal is soil that stays too wet, which can rot your plant’s roots.
What do fungus gnats look like?
Adult fungus gnats look like small black or dark gray flies, about 1/8 inch long, with long legs, antennae, and a distinctive Y-shaped vein in each wing. Larvae look like tiny translucent white worms with shiny black heads.
Where do fungus gnats come from?
Fungus gnats almost always arrive in the soil of new houseplants, in fresh bags of potting mix stored in damp garages, or through open windows in summer. Once inside, they breed quickly in overwatered plants.
Can fungus gnats damage my plants?
In small numbers, adults are mostly harmless. The real damage comes from larvae, which chew fine root hairs when populations grow large. This can cause yellowing, wilting, or stunted growth, and can kill young seedlings.
How do you get rid of fungus gnats permanently?
Let soil dry between waterings, use yellow sticky traps, apply BTI (mosquito dunks) to soil, and improve drainage. The combination of dry soil surface + BTI treatment eliminates most infestations within 3–4 weeks.
Do fungus gnats mean I’m overwatering?
Often, yes. Fungus gnats thrive in consistently moist soil. If you have fungus gnats, it’s a sign your potting mix stays wet longer than it should. Let the top 1–2 inches dry between waterings.

