Skip to main content

How to Get Rid of Fungus Gnats

  • Author:
  • Updated:

As an Amazon affiliate, we earn from qualifying purchases made through affiliate links.


If you've noticed tiny black flies in and around your houseplants or indoor seedlings, there's a good chance they're fungus gnats. These minuscule insects are weak fliers. They tend to stay close to potted plants rather than flying throughout the house. They can be seen sitting on or hopping across leaves, debris and the soil surface, as well as nearby windowsills or walls. They will fly upward when the host plant is moved or watered.

Fungus gnats prosper in damp, dark areas rich in decaying organic matter and fungus. The adult gnats lay eggs on moist soil. The larvae hatch under the soil surface and feed on organic matter, including small plant roots. This can stunt the plant's growth, but even taking into account root damage, fungus gnats are largely just a nuisance. Adult flies do little harm—aside from creating more larvae.

To control fungus gnats:

  • Resist overwatering your plants. Allow at least the top inch of the growing mix to dry out between waterings. Make sure that the container affords good drainage. Fungus gnats thrive in moist conditions.
  • Empty the pots' saucers of any water that collects in them, and clean humidity trays regularly. If potting mix escapes into these vessels, be sure to remove it.
  • Use sticky traps.
  • Spread a half an inch of coarse horticultural sand on top of the potting mix. When you water, the sand will drain and dry quickly. It is not an attractive place for the adult gnats to lay eggs, and even if they do, the sand makes it difficult for any larvae that hatches to burrow.
  • You might also replace the top inch of potting soil with fresh soil, or repot the plant entirely. Note: Fungus gnat larvae can be present in ready-made potting mixes. Letting the mix dry out after you open the bag, before you use it, might help prevent an infestation.