Short answer: the tiny flies hanging around your plants are almost always fungus gnats, and they breed in soil that stays wet. Check whether it's still wet further down under the surface. Let the pot dry out properly, catch the adults with yellow sticky traps, and cover the soil with a thin layer of sand so they have nowhere to lay eggs. Give it a few weeks, because eggs already in the soil keep hatching for a while.

> "They're not here for the plant. They're here for your watering habit." – Phil
How to tell they're fungus gnats
- Small, dark, weak-flying flies that hang around the pot or walk across the soil.
- They fly up when you water or move the pot.
- Tiny clear-ish larvae with dark heads in the top layer of soil, if you look closely.
- They're not fruit flies. Fruit flies hang around the fruit bowl and the bin, not your pots.
The larvae mostly feed on fungi and rotting bits in damp soil. Large numbers can nibble roots, which matters most for seedlings, cuttings and plants that are already struggling (UC IPM).
Check the soil first, then follow the right path
If the soil is still wet further down under the surface: that's your gnat nursery. Overwatering feeds the fungi the larvae live on, and when the soil dries out, the larvae die (University of Maryland Extension). Go straight to the steps below, starting with drying it out. If the plant is also drooping or yellowing in wet soil, read overwatered plant too.
If the soil is dry all the way through: the gnats may be coming from another pot, a bag of potting mix, or a drain. Check your other plants first. To find the source, cover one pot or drain with fine mesh or cloth for a few days and see if gnats still turn up there.
How to get rid of fungus gnats

Editor's note: We tried this ourselves on our own pots. We put sand on top and didn't water anything until all the gnats were dead, and it worked a treat. They'll try to burrow up through the sand, so check it every day or so and fill in any holes. Once they're all dead, take the sand off, because it holds moisture in the soil underneath for longer.
- Let the pot dry out properly. Don't water again until it has dried further down under the surface, not just on top. This is the step that does most of the work.
- Empty saucers and cover pots after watering so nothing sits in water.
- Put yellow sticky traps in or beside the pot. They catch the adults and show you whether numbers are dropping. Traps alone won't fix it, because the larvae are in the soil.
- Cover the soil with sand. Once the pot has dried out, spread a thin layer of sand over the soil. It dries fast, so adults have nowhere damp to lay eggs.
- Treat the larvae if numbers stay high. Soil products containing Bacillus thuringiensis israelensis (often sold as "BTI") target fly larvae. Follow the label.
- Clear dead leaves off the soil so there's less for the larvae to eat.
- Repot if it's a bad infestation. Fresh mix in a clean pot with a drainage hole resets things.
- Keep going for a few weeks. Stop when the traps stay clear.
To check for larvae, put a slice of raw potato on the soil for a few days, then lift it and look underneath.
How you'll know it's working
Fewer gnats on the traps each week, and the potato slice comes up clean. Adults live for a little while, so you'll still see a few for a week or two after the larvae are gone. That's normal.
How to stop them coming back
- Water when the plant needs it, not on a set day. Check whether it's still wet further down under the surface first. See how often to water houseplants.
- Use pots with drainage holes, and empty the saucer after watering.
- Keep the sand layer topped up after repotting.
- Check new plants before they join the others, and keep opened bags of potting mix sealed.
If the soil never seems to dry and the plant has yellow leaves or a soft stem too, the roots may be in trouble. Start at what's wrong with my plant.
Where Alive-ish fits (and where it doesn't)
Alive-ish is a plant care app for people who've lost a few plants along the way. Run a health check from a photo and you get likely causes with fixes, which helps when the gnats come with yellowing or drooping and you want to know if something else is going on. You can also ask Phil whether that's a gnat or a fruit fly.
The plain details: you start with 20 free credits. There's no subscription, and credits never expire. A plant ID costs 2 credits, a health check costs 7, and a question for Phil costs 1. If you want more, packs start from US$4.97.
What it can't do: it can't see larvae in the soil, and a photo can't tell whether the soil is still wet further down under the surface, so you still check that yourself. The answer is a best guess, not a guarantee, so use it alongside the checks in this guide.
Related guides
- Overwatered plant: signs and how to fix it
- How often to water houseplants
- What's wrong with my plant? Start here
- Yellow leaves on plants
Sources
- UC Statewide IPM Program, Fungus Gnats (Pest Notes): https://ipm.ucanr.edu/home-and-landscape/fungus-gnats/
- University of Maryland Extension, Fungus Gnats: https://extension.umd.edu/resource/fungus-gnats-indoor-plants
- University of Maryland Extension, Watering indoor plants: https://extension.umd.edu/resource/watering-indoor-plants
(All three checked live from the box on 31 Oct 2026.)