How to Get Rid of Fungus Gnats

  • Written By Dan Edwards on February 2, 2021
    Last Updated: February 2, 2021

You walk up to admire your prized geraniums, only to be met by a puff of flying critters and a soil surface that appears to be strangely alive. Sound familiar?

These are tell-tale signs of fungus gnats — annoying little pests that can ruin your last few months of careful horticultural nurturing. If you don’t take action soon, these feisty flies will turn your pride and joy into a weak, or at worst, dead plant.

You can get rid of fungus gnats by:

  • Prevent overwatering
  • Add sand to your soil
  • Use diatomaceous earth
  • Treat with nematodes
  • Utilize a fungus gnat predator

What Are Fungus Gnats? 

The term ‘fungus gnats’ covers a broad spectrum of different flying insects. Most typically, they include the species:

Usually, the adults are dark in color, around an eighth-of-an-inch long, with long legs, extended antennae and translucent wings. Visually, they’re very similar to the mosquito.

While an annoyance — they fly up in clouds as you approach your plants — they do little damage themselves. Conversely, their larvae are highly destructive.

As their name suggests, the gnat younglings eat fungi, which is particularly prevalent in moist soil.

However, these larvae aren’t that selective. They’ll move on to eat roots, particularly in young seedlings and plant stems. This creates wounds that can allow soil-borne pathogens, such as Thielaviopsis, Pythium and Fusarium, to enter the cells of the stem. The result is creating disease that can lead to its demise.

The Best Way to Get Rid of Fungus Gnats

Eliminating fungus gnats from your greenhouses, outdoor bedding and houseplants isn’t effortless. Although, you can do it successfully with time, dedication and, hopefully, minimal use of chemicals.

If you have them in your garden, don’t think that you can sit back and wait for winter to come along and kill them off. Many of these tiny terrors are phenomenally hardy creatures. They can tolerate extreme cold by possessing antifreeze proteins — just as in your car radiator — in their blood.

Some species can avoid freezing entirely, while others can tolerate being semi-frozen. Incredibly, a few unfortunate varieties of fungus gnats can allow their head to become ice-bound — while having a frost-protected abdomen — and still survive.

Here are the best ways to save your plants from fungus gnats:

Don’t Overwater

If your soil is continuously moist, you’re creating a luxury restaurant for fungus gnats. Dampness is advertising to these creatures that there’s going to be a ready supply of rotting plant matter, fungi and algae.

Allow the topsoil to dry out completely before watering again. Remember, it’s the roots that require moisture. Deeper in the plant pot or ground, there’ll still be a ready supply of water to allow your plant to thrive.


Around the base of your plants, whether indoors or outdoors, spread a layer of sand. Ideally, cover it with around a quarter to a half-inch of this gritty material. 

Sand is both fast-draining and quick drying. This will prevent your soil from being an attractive place for the fungus gnats to reproduce.


Throw it on your salads, clean your windows with it, and now, get rid of fungus gnats. 

Vinegar can do anything.

This method is particularly effective on the species Drosophilidae. Locate a small jar — baby food size — half fill it with vinegar and add a little dish detergent to break up the surface tension. If you don’t add the soap, the gnats will merrily walk along the vinegar, laughing at you — not literally!

With the detergent and vinegar mixture inside the jar, replace the screw lid. Poke a few small holes in the top — just large enough for the gnats to enter — and place near plants with the insect issues.

The tiny fliers will enter the jar, go to investigate the appealing smell of the vinegar and drown. Every so often, drain the mixture to remove the corpses and reuse.

This method, however, will only help to control the adult flying population, not the larvae.

Diatomaceous Earth

A powerful and safe way to eliminate the fungus gnat larvae, diatomaceous earth contains the fossilized remains of small aquatic organisms — diatoms. The preserved parts of their skeleton contain abrasive silica that’s a bane to the crawling youngsters. Add it to the top layers of your earth around your plant and you’re done.

As the larvae move through the soil, the sharp edges of the diatomaceous earth cut into their bodies — akin to us walking over broken glass. This enables the medium to absorb water and moisture from the insect’s body, killing it.

While highly effective, be careful when adding it to your plants. The dust is extremely fine and contains the larvae-killing abrasives. If you inhale it or get it on your hands, you could do yourself some harm.

Always handle diatomaceous earth with gloves and wear a mask when applying to your plants. Additionally, we advise to only use it in houseplants. It hurts larvae, but has an equally nasty effect on earthworms in the garden and vegetable patches, which are your friends.

Biological Treatments

If the above treatments don’t eliminate the problem, then it’s time to bring out the big boys.

Bacillus Thuringiensis

Bacillus thuringiensis is a naturally occurring bacterium that you can purchase commercially.

It’s a selective pesticide that targets the larvae of fungus gnats. Thankfully, it won’t endanger you, your pets, fish or wildlife.


These microscopic worms, particularly Steinernema feltiae, will wipe out your larvae, although the process is somewhat unpleasant. They penetrate the wriggling gnat youngsters and, once inside, release a bacterium. This then kills the larvae by eating it from the inside out.

Numerous brands retail these nematodes, and they’re safe for use around humans and animals.


This commercially-available chemical is an extract from the Indian neem tree.

  1. Mix around 1 tablespoon of this treatment with one gallon of water
  2. Drench the upper soil layer of your affected plants
  3. Check the soil after one week to check whether you need to make a repeat application

Azadirachtin only targets the fungus gnats’ larvae, killing them when they make contact with the compound.

Fungus Gnat Predator

If your fungus gnat issue is over a substantial expanse, say in the garden or greenhouse, then consider using Hypoaspis aculeifer.

These predatory mites move through the soil and consume the larvae, without damaging your precious plants.

Progress is slow, but as these gnat-killers mate and multiply, their speed of efficacy increases. They provide a long-lasting measure as gnat prevention once the immediate threat has gone.

Generally speaking, release around 10,000 of these munchers per 200–1,000 feet, depending on infestation levels.

Flying Insect Killer

To destroy the flying army of gnats, you can use a pyrethroid-based killer spray. These often contain the proven insecticide of cyfluthrin, which can be detrimental to humans and animals if overexposed.

There are eco-alternatives on the market that include essential oils such as cinnamon and peppermint. These are completely safe, with research indicating they’re effective treatments for flying insect issues.


Fungus gnats are not only unsightly, but they can also lead to the sad demise of your plants. Unless you address the issue, it won’t go away. Those feisty fliers have found their ideal home of warmth, moisture and food — they’re there to stay.

That is unless, of course, you follow our tips outlined above. These measures will both address the immediate issue and help to prevent the situation from recurring, evicting those unwanted tenants and locking the door.