You water a plant, and a tiny cloud of black flies rises from the soil. They hover around your pots, wander across the windowsill, and somehow always fly straight at your face. These are almost certainly fungus gnats — the most common indoor plant pest of all. The happy news: they are more annoying than dangerous, and with a little patience you can get rid of them for good.
To beat fungus gnats, it helps to understand them. The adults you see are only half the story. They lay their eggs in damp soil, where their tiny larvae live and feed for a week or two before turning into the next wave of flying adults. If you only chase the flying adults, the cycle keeps going. The plan below breaks the cycle at every stage.
Quick Answer
Get rid of fungus gnats by attacking both stages at once: let the top layer of soil dry out between waterings to kill eggs and larvae, and place yellow sticky traps just above the soil to catch the flying adults before they can lay more eggs. For heavy infestations, water with a diluted biological larvicide or a hydrogen peroxide mix (one part standard 3% peroxide to four parts water) to kill larvae in the soil. Be consistent for three to four weeks and the gnats will disappear.
What Are Fungus Gnats, Exactly?
Fungus gnats are tiny dark flies, about 2–5 mm long, with delicate wings and long legs. They are weak fliers and tend to stay close to the soil, which is a helpful clue. Their larvae are almost invisible — thin, translucent worms with tiny black heads that live in the top few centimetres of moist potting soil, feeding on fungi and decaying material. A few larvae do little harm, but a large population can nibble at fine root hairs and stress seedlings and already-weak plants. Adult gnats do not bite people or damage leaves; their only crime is being extremely irritating, and laying up to a couple of hundred eggs each in damp soil.
First, Make Sure They Really Are Fungus Gnats
Fruit flies are often blamed instead. Fruit flies are plumper, tan or brown, gather around fruit and drains, and fly strongly. Fungus gnats are slimmer, darker, hang around plant pots, and run across the soil surface when disturbed. A simple test: leave a pot undisturbed, then tap it. If small dark flies rise from the soil, you have fungus gnats, and soil-focused treatment will work.
Why Fungus Gnats Appear in the First Place
Fungus gnats almost always arrive with the perfect home already prepared for them: soil that stays moist at the surface, day after day. They may drift in through an open window, arrive in a bag of potting mix, or hitch a ride on a new plant. Once inside, a single female can lay a couple of hundred eggs in damp soil, so a couple of stray flies can become a noticeable cloud within a few weeks. This is why the long-term answer is never just catching flies — it is changing the soil conditions so eggs and larvae cannot survive. Homes with many plants watered on a fixed schedule, whether the soil needs it or not, are the ones gnats love most.
The Step-by-Step Plan to Get Rid of Them
Step 1: Let the Soil Dry Out
This is the single most effective step. Eggs and larvae need moist soil to survive, so let the top 3–5 cm (1–2 inches) dry completely between waterings. Most common houseplants tolerate this easily. Water from the bottom where you can — place the pot in a shallow tray of water for 20–30 minutes, then remove it — so the surface stays dry while the roots still drink. Damp soil is also the root cause of many plant troubles, as our guide on how to fix an overwatered houseplant explains.
Step 2: Trap the Flying Adults
Set yellow sticky traps on small stakes just above the soil of every affected plant — and its neighbours too. The adults are drawn to yellow, land, and cannot escape to lay eggs. Traps also tell you how the battle is going: fewer catches each week means you are winning. Replace traps when they are covered or after a few weeks.
Step 3: Treat the Larvae in the Soil
For a mild case, dry soil plus traps is often enough. If gnats persist, treat the soil. Options include watering with a biological larvicide made for fungus gnats, a diluted hydrogen peroxide mix (one part standard 3% peroxide, four parts water — it fizzes briefly and is safe for most plants), or a “tea” made by soaking a piece of mosquito dunk in watering water overnight. Repeat the treatment weekly for at least three weeks to catch each new generation as it hatches.
Step 4: Add a Dry Top Layer
Cover the soil surface with about 1 cm (half an inch) of horticultural sand, fine gravel, or small decorative stones. This layer dries out quickly, making the surface unattractive for egg-laying adults and harder for new adults to emerge from below. It also looks neat and tidy, which is a pleasant bonus.
Step 5: Clean Up and Check Every Plant
Remove fallen leaves from the soil surface, empty saucers so pots never sit in water, and check every plant in the home — gnats spread easily from pot to pot. If one plant is severely infested and weak, consider repotting it with fresh soil after rinsing the old soil from its roots. Persistent gnats on a plant whose leaves are also yellowing may mean the soil has stayed wet far too long; the patterns in our guide on why houseplant leaves turn yellow can help you check.
How Long Does It Take?
Expect real progress in two weeks and a clear home in three to four weeks, as long as you keep the routine going. The most common reason treatments “fail” is stopping after one week: the adults vanished, but eggs already in the soil hatched into a fresh wave. Keep traps up and the soil surface dry for a full month and the cycle fully breaks.
Keep a simple weekly rhythm while you treat: check the traps every few days, note whether the numbers are falling, and only water a plant when its soil surface has dried. Writing the trap counts on a small note near your plants sounds fussy, but it turns guesswork into evidence — falling numbers tell you the plan is working, and steady numbers tell you a hidden damp pot somewhere still needs attention.
Mistakes to Avoid
- Only treating the flying adults. Adults are just the visible part of the problem. If you ignore the larvae in the soil, a new wave of flies will replace them in a week or two.
- Stopping after one good week. Gnats lay eggs that hatch over several weeks. Keep treating for a full month, even if the adults seem to have gone.
- Using vinegar traps. Vinegar traps catch fruit flies, not fungus gnats. Yellow sticky traps and dry soil are the tools that work for this pest.
- Watering on a fixed schedule. Water only when the soil needs it. A fixed routine is what kept the soil damp enough for gnats in the first place.
- Treating only one plant. Gnats travel from pot to pot. Check every plant in the home and treat them together.
Frequently Asked Questions
Are fungus gnats harmful to my plants?
Adults are harmless. Larvae mostly eat fungi and decaying matter in the soil, but in large numbers they can damage fine roots and harm seedlings or weak plants. A healthy, established plant usually tolerates a small population, though it is still worth clearing them.
Do fungus gnats bite people or spread indoors?
No, they do not bite. They stay near moist soil and plants, though a large population will wander to windows and lights nearby. Remove the damp-soil conditions and they will not settle elsewhere in the home.
Does apple cider vinegar catch fungus gnats?
Vinegar traps are designed for fruit flies and work poorly on fungus gnats, which are far more attracted to yellow sticky traps near the soil. Save the vinegar for the fruit bowl.
How do I stop fungus gnats coming back?
Keep the habits that fixed them: let the soil surface dry between waterings, empty saucers, remove dead leaves from pots, and quarantine and inspect new plants for a week before placing them with the others.
The Bottom Line
Fungus gnats win when soil stays wet and nobody interrupts their breeding cycle. Dry the surface, trap the adults, treat the larvae, and stay consistent for a few weeks — that combination ends them for good. For more gentle, practical fixes for everyday plant troubles, visit our indoor plant care and problems hub.


