Few things are more frustrating than watering your favourite houseplant, only to see a cloud of tiny black flies buzzing up from the soil.

The good news is that fungus gnats are incredibly common, and in most cases they’re more annoying than dangerous. They don’t mean you’re a bad plant parent, and you don’t need to throw your plant away.
The key is understanding why they’re there in the first place and breaking their life cycle.
In this guide, you’ll learn exactly how to get rid of fungus gnats, prevent them from returning and keep your houseplants healthy.
If you’re troubleshooting other common houseplant issues, you might also like our guides on How Often Should You Water Houseplants?, Why Is My Plant Growing So Slowly? and The Best Houseplant Care Routine for Beginners.
What Are Fungus Gnats?
Fungus gnats are tiny black flies that live in damp potting soil.
They’re often mistaken for fruit flies because they’re a similar size, but fungus gnats spend most of their time crawling over compost or flying around your houseplants rather than your fruit bowl.
Adult fungus gnats don’t usually damage healthy plants. The real problem is their larvae, which live in the soil and feed on fungi, decaying organic matter and occasionally delicate plant roots.
Healthy, established houseplants usually cope just fine, but seedlings, cuttings and young plants can be more vulnerable.
What Causes Fungus Gnats?
Fungus gnats love consistently damp compost.
Common causes include:
- Overwatering
- Poor drainage
- Potting soil that stays wet for too long
- Organic-rich compost
- Standing water in saucers
- Bringing home an already-infested plant
Warm indoor temperatures allow fungus gnats to reproduce quickly, which is why a small problem can suddenly seem much bigger.
Signs You Have Fungus Gnats
You may have fungus gnats if you notice:
- Tiny black flies flying around your plants
- Flies crawling across the surface of the compost
- Insects appearing whenever you water
- Small white larvae in the top layer of soil
- Seedlings struggling for no obvious reason
They’re usually most active after watering because the damp compost encourages them to emerge.
How to Get Rid of Fungus Gnats
Fortunately, fungus gnats are usually easy to eliminate if you’re consistent.
1. Let the Soil Dry Out
This is often the most effective solution.
Fungus gnat larvae need damp compost to survive. Allowing the top few centimetres of soil to dry between waterings makes the environment much less appealing.
Always check the soil before watering rather than sticking to a fixed schedule.
Related reading: How Often Should You Water Houseplants?
2. Use Yellow Sticky Traps
Yellow sticky traps catch the adult flies before they can lay more eggs.
While they won’t kill the larvae living in the soil, they help break the breeding cycle and let you monitor whether the infestation is improving.
Recommended product (affiliate):
👉 Yellow sticky traps for houseplants
3. Remove Dead Leaves and Debris
Dead leaves, fallen flowers and other organic matter provide extra food for fungus gnat larvae.
Keeping the surface of the compost clean removes one of their favourite breeding areas.
4. Improve Drainage
Waterlogged soil creates the perfect environment for fungus gnats.
Make sure your pot has drainage holes and avoid leaving plants sitting in water for long periods.
If water regularly pools in the bottom of decorative pots, empty it after watering.
5. Repot if the Infestation Is Severe
If your plant is heavily infested, replacing the compost can dramatically reduce the number of larvae.
When repotting:
- Remove as much old compost as possible.
- Inspect the roots.
- Use fresh, well-draining potting mix.
- Wash the pot before reusing it.
Related reading: Beginner’s Guide to Repotting Houseplants.
6. Consider Bottom Watering
Bottom watering keeps the surface of the compost drier, making it less attractive to fungus gnats.
It isn’t suitable for every situation, but many indoor plants benefit from occasional bottom watering.
7. Treat the Larvae
If drying the soil and sticky traps aren’t enough, you may need to target the larvae directly.
Gardeners commonly use:
- Beneficial nematodes
- Bacillus thuringiensis israelensis (BTI) products such as Mosquito Bits
- Diluted hydrogen peroxide solutions
Always follow the manufacturer’s instructions before applying any treatment.
What Doesn’t Work Very Well?
Some methods are popular online but rarely solve the problem on their own.
These include:
- Spraying only the adult flies
- Killing individual insects by hand
- Continuing to overwater
- Ignoring the infestation
Remember, the adults are only part of the problem. The larvae in the compost are what keep the cycle going.
How Long Does It Take to Get Rid of Fungus Gnats?
Most infestations improve within two to six weeks.
Adult fungus gnats only live for around a week, but new adults continually emerge from eggs laid in the compost.
Consistency is key. Continue drying the soil and using sticky traps until you stop seeing new flies.
How to Prevent Fungus Gnats
Once you’ve got rid of them, a few simple habits can stop them returning.
- Water only when your plant actually needs it.
- Allow the surface of the compost to dry between waterings where appropriate.
- Remove dead leaves from the pot.
- Always use pots with drainage holes.
- Empty saucers after watering.
- Quarantine new plants for a week or two before placing them with your collection.
Healthy watering habits are the best long-term defence.
Products That Can Help
These are great places to naturally include Amazon affiliate links.
- Yellow sticky traps
- Moisture meter
- Houseplant potting mix
- Indoor watering can
- Decorative pots with drainage
- Beneficial nematodes
- BTI treatment
- Hydrogen peroxide
- Plant repotting mat
Frequently Asked Questions
Are fungus gnats harmful to houseplants?
Adult fungus gnats are mostly just a nuisance. However, large numbers of larvae can damage the delicate roots of seedlings, cuttings and young plants.
Will fungus gnats eventually disappear on their own?
Usually not.
Unless the conditions change, adults will continue laying eggs and the infestation can persist for months.
Are fungus gnats the same as fruit flies?
No.
Fruit flies are attracted to ripening fruit and food waste, while fungus gnats breed in damp potting compost.
Does cinnamon get rid of fungus gnats?
Some gardeners find cinnamon helps reduce fungal growth on the soil surface, but it’s unlikely to eliminate a fungus gnat infestation on its own.
Can I use hydrogen peroxide?
Some gardeners use diluted hydrogen peroxide to help reduce larvae in the soil.
Always dilute it correctly and avoid overusing it, as repeated applications may stress some plants.
Should I throw my plant away?
Almost never.
Fungus gnats are extremely common and can usually be controlled with better watering habits and a few simple treatments.
Final Thoughts
Finding tiny black flies around your houseplants can be annoying, but fungus gnats are one of the easiest plant problems to solve once you understand what’s causing them.
In most cases, the answer is simple: let the compost dry a little more between waterings, improve drainage and break the breeding cycle with sticky traps or targeted treatments if needed.
Before long, both you and your houseplants should be able to enjoy a much more peaceful home.
Continue Reading
You might also enjoy:
- How Often Should You Water Houseplants?
- Beginner’s Guide to Repotting Houseplants
- Why Is My Plant Growing So Slowly?
- The Best Houseplant Care Routine for Beginners
- How to Clean Houseplant Leaves
