How To: Get Rid of Fungus Gnats

If the little gnats that hang out around your houseplants are beginning to bug you, here’s how you get them to bug off.

By Audrey Stallsmith | Published Jul 23, 2021 4:17 PM

how to get rid of fungus gnats

Do tiny insects fly up into your face every time you water your houseplants? Then you’ll want to know how to get rid of fungus gnats. Those 1/16- to 1/8-inch-long bugs don’t bite, but they do lay eggs in damp potting soil. The eggs then hatch out into larvae about 1/4-inch long with black heads and white or translucent bodies.
In addition to feeding on fungi and organic matter in the soil, those larvae might chow down on your plants’ roots. Although the “worms” are small enough that they usually don’t do much harm, they can be a nuisance.


To determine what type of gnats you have, keep in mind that fungus gnats resemble miniature mosquitos and swarm around houseplants. Fruit flies resemble flea-sized flies and target your fruits and vegetables, while drain flies resemble miniscule moths and gather near sinks.

STEP 1: Isolate new and infected plants.

When bringing any new houseplant home, keep it in a different room from your other plants for at least a few weeks while you ascertain whether it’s concealing unwelcome visitors. Also, once you’ve spotted insects on a plant, remove that container to a safe distance from your other plants as well.

You can determine whether those insects are fungus gnats by placing a 1/4-inch slice of raw potato on the soil surface. After a few days, check the underside of that potato for tiny black-capped “worms.” If you find any, try the following solutions.

Related: Houseplant Pests—How to Deal with 6 Common Culprits

how to get rid of fungus gnats

STEP 2: Dry out the soil somewhat before your next watering.

Because fungus gnats like to lay their eggs in damp soil and their larvae usually inhabit the top few inches of it, they especially proliferate during winter when gardeners unthinkingly continue to water those plants as often as they did during summer. Instead, allow the soil in your pots to dry out to a depth of 2 inches before you water those pots again. Don’t let that soil dry out completely, however, or you might end up killing your plants in your quest to kill their pests.

STEP 3: Think twice before spraying with an insecticide.

If you don’t have pets, you might want to try spraying your plants and the surface of their soil with a pyrethrin solution. Pyrethrins are natural insecticides that don’t harm humans, but reportedly can be harmful to pets—cats and fish in particular.

Although some sources recommend a dish-soap solution instead, its grease-removing properties can strip the waxy coating from plants too. Insecticides won’t affect the larvae, so you must apply them frequently to deal with newly emerging bugs. It’s probably a better idea to use a combination of sticky traps and soil drenches instead.

Related: Solved! What Your Plant’s Yellow Leaves Mean and How to Fix Them

how to get rid of fungus gnats

STEP 4: Add sticky traps.

Among the easiest-to-use gnat traps, yellow sticky traps somewhat resemble sticky notes. Place them horizontally on the surface of your plants’ soil or suspended on metal holders above it. Those traps have a glue coating that captures adult gnats as well as the freshly pupated ones just emerging from the soil. The traps come in a wide variety of shapes and sizes; they also come as stakes, which look like miniature trees with goopy and loopy leaves. Keep setting out fresh traps as needed until no more insects adhere to them.

STEP 5: Use neem-based or mosquito dunk drenches.

Since sticky traps don’t affect larvae still in the soil, you might want to also try a drench with azadirachtin, an insecticide derived from neem oil that lacks the greasiness of that oil. After mixing it with water at the recommended rate—usually about 1 tablespoon of azadirachtin per gallon of water—you can pour some of that solution into the soil to kill the larvae still present.

An alternative idea is to soak a mosquito dunk containing the beneficial bacteria Bacillus thuringiensis subsp. israelensis in a gallon of water overnight. The next day, use that water as a continuing drench.

Related: Houseplant Problems—11 Signs of an Unhappy Indoor Plant

STEP 6: Lure them out with apple cider vinegar.

If you prefer to avoid insecticides, lure gnats away from their plants with a shallow container such as a jar lid filled with half water and half vinegar to which you’ve added a few drops of dish detergent. Make sure that solution is at least 1/4 inch deep and place its container near an infected plant or even atop its soil. Once the gnats have been lured into the mix by the vinegar, the soap should clean their clocks.

how to get rid of fungus gnats

STEP 7: Dispose of the top layer of soil outdoors.

It’s also a good idea to get rid of that infested top 2 inches of potting soil—just in case! After removing, discarding, and replacing that soil, you might want to consider sprinkling about 1/2 inch of sand over the surface. Fungus gnats aren’t fond of sand, since it dries out quickly and contains none of that rotting organic debris that they love.

STEP 7: Prevent future infestations.

To prevent future infestations, always use sterilized potting soil to pot your plants and keep the extra soil inside a closed container after opening its bag. Also, don’t mix compost into your potting soil unless it has been completely finished and sterilized.

You can “clean” potting soil or compost naturally by solarizing it. To do so, place the soil inside a sealed plastic bag and pat it flat so that it is no more than 8 inches deep. Then lay it on a raised location in the sun for at least a month.

You often can prevent gnat infestations from getting out of control indoors by repotting your plants with new potting soil more frequently. Although fungus gnats live outdoors too, they generally don’t cause problems in such unenclosed spaces.

Although gnats and their slimy offspring look less than natty, they generally aren’t as harmful as other “bad bugs.” So, although you might never completely eliminate them from your houseplant collection, follow some of the suggestions above to keep their numbers low enough that they remain relatively harmless.