If the tiny flies swarming your home rise up from the potted plants when you brush past them, you are probably not dealing with fruit flies at all. Damp potting soil is the classic breeding ground for a different insect — the fungus gnat — and the fix is completely different. This guide helps you tell them apart, explains how soil becomes a nursery, and shows the watering habits that dry the problem out.

In short
- Likely culprit
- Fungus gnats, not fruit flies, if they come from the soil
- How to tell
- Gnats are dark, slender and mosquito-like; fruit flies are tan with red eyes
- The nursery
- Constantly damp potting soil rich in organic matter
- The core fix
- Let the top of the soil dry out between waterings
First, check what you actually have
This is the one source where identification matters most, because two very different insects get confused. Fruit flies are tan or yellow-brown, roughly 2–4 mm, with stout bodies and often bright red eyes; they hover over fruit, bins and drains. Fungus gnats are darker, more delicate and mosquito-like, with longer legs and a weak, fluttery flight; they linger around plant pots and scatter up from the soil when you water or move the pot. If the flies are rising from the soil rather than the kitchen, gnats are the overwhelming likelihood.
Getting this right saves you from wasting effort. A vinegar trap on the windowsill will barely dent a gnat population, and drying the soil will do nothing for flies breeding in the bin. Settle it before you act with our side-by-side fruit flies vs fungus gnats comparison, or run the quick fly identifier tool. You can also rule out the other small household look-alikes in other tiny flies in the house.
Note: Occasionally genuine fruit flies do gather near plants — usually because of fallen fruit, a nearby fruit bowl, or organic mulch that is fermenting. But if the flies are emerging from the soil itself, think gnats first.
Why damp soil breeds gnats
Fungus gnat larvae live in the top few centimetres of potting mix, where they feed on fungi, algae and decaying organic matter — exactly the material that thrives in soil kept constantly wet. Peat-based composts and pots without good drainage hold moisture near the surface, creating a permanently damp layer that is a perfect nursery. Overwatering is the single biggest cause: the soil never dries, the fungal food supply never runs out, and generation after generation hatches from the same pot.
Warmth speeds it up, which is why indoor plants in a heated home can produce gnats year-round even when the kitchen is fly-free. A newly bought plant or a fresh bag of compost can also arrive already carrying eggs, so a problem can appear days after you repot.
A few plant-care habits quietly make the problem worse. Leaving a decorative saucer permanently full of water keeps the base of the pot soggy. Burying kitchen scraps or used tea leaves in the soil as a "natural feed" gives the larvae extra food. Mulching indoor pots with bark or leaf mould traps moisture at the surface. And grouping many plants tightly together raises the humidity around them all. None of these ruins a plant, but each tilts the soil toward the damp, organic-rich state gnats thrive in — so easing off them is often half the cure.
Drying the problem out
Because the larvae depend on moisture, the most powerful control is simply to change how you water. You are aiming to make the top layer of soil hostile to them.
- Let the top dry between waterings. Allow the top 2–3 cm (about an inch) of soil to dry out before watering again. This alone kills many larvae and stops new eggs surviving. Most houseplants tolerate this far better than constant damp.
- Water from below when you can. Standing the pot in a tray of water lets the roots drink while keeping the surface drier, denying the larvae their layer.
- Improve drainage. Make sure pots have drainage holes and empty the saucer after watering. A top dressing of coarse grit or sand makes the surface less inviting to egg-laying adults.
- Use yellow sticky traps. Flat yellow sticky cards laid on the soil surface catch the flying adults and let you monitor whether the population is falling.
- Treat stubborn cases biologically. For persistent infestations, a soil drench of BTI (a naturally occurring bacterium sold for gnats) or beneficial nematodes targets the larvae without harsh chemicals.
Why this works: The larvae cannot survive in dry soil, so drying the surface starves the next generation while sticky traps and BTI mop up the adults and any larvae that remain. Within a couple of weeks the pot stops producing flies.
If it really is fruit flies near your plants
Suppose you have identified true fruit flies gathering around a plant. The plant itself is rarely the breeding site — look instead for what is nearby: a fruit bowl on the same shelf, dropped fruit, a drink left among the pots, or fermenting organic mulch. Remove that source and the flies disperse. Our dedicated guide fruit flies in houseplants covers this overlap in more detail, and you can set an apple cider vinegar trap nearby to confirm and thin them out.
Where plants fit in the bigger picture
Houseplants are the source most often blamed and most often misdiagnosed, so identifying the insect correctly is half the battle. Once you have, the fix is a watering habit, not a trap. If the flies turn out to be fruit flies after all, work through the real breeding sites in the sources hub — starting with the fruit bowl, the bin and the drain — and use the systematic method in how to find the breeding source to pin down which one is active. Right insect, right fix, and the swarm around your plants disappears.
Sources
- University of Minnesota Extension — fungus gnats in the home and houseplants
- University of Kentucky Entomology — fungus gnat and fruit fly identification
- Illinois Extension — managing fungus gnats in indoor plants