How to Get Rid of Fruit Flies

Fruit Flies in Houseplants (and When They're Fungus Gnats)

Fruit bowls and potting soil in living spaces — what you can do.

If little flies rise up whenever you water a houseplant, you are almost certainly looking at fungus gnats rather than fruit flies. They are a different insect with a different weakness, so the vinegar trap that beats fruit flies will barely dent them. Get the identification right and the fix is straightforward — it lives in the pot, not in the fruit bowl.

⚡ Quick answer

Flies around houseplants are usually fungus gnats breeding in damp soil, not fruit flies, so the fix is to dry the soil out. Let the top few centimetres dry between waterings, add yellow sticky traps, and use a BTI or nematode treatment for the larvae. If they hover over fruit instead, treat them as fruit flies.

An indoor potted houseplant; damp potting soil is a common breeding site for fungus gnats often mistaken for fruit flies
Photo: Wcedmisten

In short

Most likely culprit
Fungus gnats breeding in damp potting soil
How they look
Small, dark, delicate and mosquito-like, with long legs — not tan with red eyes
Root cause
Soil kept too wet, feeding fungus and algae the larvae eat
What works
Let the soil dry, yellow sticky traps, and BTI or beneficial nematodes
When it's fruit flies
Only if fermenting fruit, spilled juice or a fruity feeder is nearby

Fungus gnats or fruit flies?

The two insects are easy to tell apart once you know what to look for. Fruit flies are tan or yellow-brown, rounded, and usually have bright red eyes; they hover in short hops around fruit and drains. Fungus gnats are dark grey or black, slender and mosquito-like, with noticeably long legs and a weak, drifting flutter. They emerge from the soil surface, settle on leaves and windows, and are clumsy in the air.

Because the control methods are completely different, it is worth being sure. Compare them side by side in fruit flies versus fungus gnats, run the quick fly identifier, or skim the wider roundup of tiny household flies if neither quite fits. Getting this step right saves you from a week of traps that were never going to work.

Why they are in the soil

Fungus gnat larvae live in the top inch or two of moist potting mix, where they feed on fungus, algae and decaying organic matter. The single biggest cause is overwatering: constantly damp soil grows exactly the fungal film the larvae eat, and a rich peaty compost with plenty of organic matter gives them even more to work with. Pots that never dry out — because they sit in a saucer of water, drain poorly, or get watered on a fixed schedule regardless of need — become a steady gnat factory.

That single fact points straight to the solution. Take away the constant moisture and you take away the nursery. We go deeper into how soil breeds these flies in houseplants and soil.

Dry the soil out

Letting the soil dry is the most powerful single change you can make, because fungus gnat larvae and eggs cannot survive in a dry top layer.

  1. Water less, and from below. Let the top 2–3 cm (about an inch) of soil dry completely before watering again. Where a plant tolerates it, water from the saucer so the surface stays drier.
  2. Empty standing saucers. Never leave a pot sitting in a reservoir of water. Tip away what drains through.
  3. Top-dress the surface. A layer of coarse sand, fine gravel or horticultural grit about 1 cm deep makes the surface hostile to egg-laying and dries fast.
  4. Improve drainage. Check that pots have working drainage holes and are not compacted; repot chronic offenders into a grittier, less peaty mix.

Trap the adults and treat the larvae

Drying the soil starves the next generation, but you still want to reduce the adults flying now and kill the larvae already in the pot. Two tools do most of the work.

Yellow sticky traps laid flat on the soil or stood upright in the pot catch egg-laying adults, and they double as a progress meter — when the traps stop filling, you are winning. See sticky traps and fly paper for placement tips.

BTIBacillus thuringiensis israelensis, sold as mosquito bits or a drench — is a naturally occurring bacterium that specifically kills fly larvae in the soil while leaving the plant, pets and people unharmed. Soak the bits in your watering can, then water the plant with the tea for a few cycles. Beneficial nematodes (microscopic worms watered into the soil) are another biological option that hunts the larvae directly. Together with drier soil, these clear a fungus gnat outbreak within a couple of weeks.

Good to know: A vinegar-and-soap dish helps a little with fungus gnats because it catches some wandering adults, but it does nothing to the larvae in the soil. Treat it as a minor add-on, not the main plan.

When it really is fruit flies

Occasionally the flies around a plant genuinely are fruit flies. This happens when there is a fermenting attraction nearby — a bowl of ripening fruit on the same shelf, a splash of sugary drink in the soil, a windfall of decaying leaves and flowers on the surface, or fruit scraps buried in the pot as makeshift compost. Some people also keep small fruit-based feeders or fermenting plant food that draws them in.

If you have confirmed tan, red-eyed flies rather than dark, leggy gnats, treat it as an ordinary fruit fly problem: remove the fermenting material, clear away fallen fruit and dead plant matter, and set a apple cider vinegar trap to catch the adults. It also helps to understand how quickly they turn over generations, which we explain in the fruit fly life cycle. The core method — remove the source, then trap the adults — is the same one that runs through the whole remove fruit flies hub.

Caution: New plants and fresh bags of potting mix often arrive already carrying fungus gnat eggs. Let a new plant's soil dry out and check it for a couple of weeks before assuming it is clean, and store opened compost sealed and dry.

Keeping plants gnat-free

Prevention here is mostly about watering discipline. Let pots dry between waterings, avoid rich peaty mixes for plants that do not need them, use a gritty top-dressing on vulnerable pots, and quarantine new arrivals until you are sure they are clean. Keep an eye on any plant that lives somewhere warm and humid, since that is where gnats rebound fastest. With drier soil and a couple of sticky traps left in place, a houseplant that once launched a cloud with every watering settles down and stays quiet.

Sources

Keep them gone for good

Once the flies are gone, the next step is stopping new ones from coming in.