Lawn & Garden Gardening Garden Pests

How to Get Rid of Fungus Gnats: 4 Remedies That Work

If the flying menaces hanging out around your houseplants and seedlings are getting on your last nerve, here’s how you get them to bug off.
Audrey Stallsmith Avatar
how to get rid of fungus gnats

We may earn revenue from the products available on this page and participate in affiliate programs. Learn More ›

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 naturally. This type of gnat doesn’t bite, but they do lay eggs in damp potting soil.

Luckily, there are multiple natural methods for how to get rid of fungus gnats in houseplants. The below procedures can be used in the home as well as for outdoor container plants, but they’re primarily targeted at indoor fungus gnat treatment.

What are fungus gnats?

Fungus gnats are tiny flying bugs belonging to a few insect families (namely Sciaridae, aka dark-winged fungus gnats). They eat plant matter, mulch, compost, and—true to their name—fungus. All of these materials can be found outdoors, but these dietary needs can be found even more reliably in potting soil for houseplants. Their attraction to potting mix’s warmth and moisture makes fungus gnats particularly problematic indoor pests.

Adult female fungus gnats lay their eggs in organic, moisture-rich environments like potting mix, which hatch into larvae in a matter of days at room temperature. In addition to feeding on fungi and organic matter in potting soil, these larvae might also chow down on houseplants’ roots. Within two weeks, they develop into pupae and finally adult fungus gnats, at which point they emerge from the soil to begin the cycle of egg-laying anew.

What do fungus gnats look like?

At 1/16 to 1/8 inch in length, fungus gnats are puny and easy to miss in small numbers. Adults look like miniature mosquitos and are dark in color, while 1/4-inch-long larvae resemble tiny worms with white or translucent bodies and black heads. Even smaller, dormant eggs are yellow to white in color, potentially making fungus gnat eggs in soil visible when taking a closer look at the contrasting surface of affected potting mix.

To determine what type of gnats you have, keep in mind that fungus gnats swarm around houseplants. Fruit flies, drain flies, and fungus gnats are often mistaken for one another. However, it’s easy to figure out which type of insect you have by considering the locations in which you find them: Flea-sized fruit flies target fruits and vegetables, miniscule moth-like drain flies gather near sinks, and fungus gnats are generally found on and around houseplants.

Bob Vila and its parent company, Recurrent Ventures, puts conservation and sustainability at the forefront of nearly everything we do. Though effective, some of the solutions offered in this content are not organic or sustainable. Bob Vila’s staff encourages readers to make informed choices about maintaining their home and property, and opt for solutions that will not have detrimental effects on the health and longevity of this planet and its inhabitants.

How to Get Rid of Fungus Gnats

When bringing any new houseplant home, keep it in a different room from your other plants for at least a few weeks while ascertaining if it conceals unwelcome visitors. Once you’ve spotted insects on a plant, remove that container a safe distance away from your other plants.

How do you know whether those insects are fungus gnats, or some other type of bug? Here’s an easy test: 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 fungus gnat “worms” (larvae). If you find any, try any or all of the following solutions to get rid of fungus gnats in plants. The staff at Bob Vila always recommends trying eco-friendly, nontoxic methods before applying any pesticides, which can have harmful side effects.

Sticky Traps

how to get rid of fungus gnats

Yellow sticky traps that look something like sticky Post-it notes are among the easiest-to-use gnat traps, and they’re an effective fungus gnat killer. Their glue coating captures adult and pupae alike, and the traps come in a variety of shapes and sizes. Gardeners can also buy fungus gnat traps in stake form, which look like miniature trees with sticky leaves.


Sticky traps or stakes
Potting mix (optional)
Sand or diatomaceous earth (optional)

STEP 1: Place the traps.

If you are using double-sided sticky traps, there are a couple of ways you can situate them: You can peel the protective cover off just one side of the trap and lay the trap horizontally on the surface of your plants’ soil, with the sticky side up. Alternatively, expose both of the sides of the sticky traps, adhere one side of the trap to a chopstick, popsicle stick, or another such post, and “plant” the stick vertically in the affected pot. For enthusiastic gardeners with rows upon rows of plants on shelving, we’ve found that exposing both sides of the sticky traps and “taping” the edge of a trap to each shelf will catch gnats—and lots of them—on both surfaces

If you’re using sticky stakes, stick the pointy end into the potting mix until the lowermost sticky loop touches the surface, and repeat until a suitable number of stakes are in place. Lightly shake your plant’s stem or leaves to encourage any fungus gnats to fly into the traps.

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

STEP 2: Wait and replace the traps as needed.

Check on affected houseplant(s) regularly, as the sticky traps should be a visual indication of your fungus gnat infestation’s current severity. Dispose of used sticky traps in a sealed garbage bin, and set out fresh traps as needed until no more gnats adhere to them.

STEP 3: Replace the top layer of soil (optional).

For added caution, it wouldn’t hurt to properly dispose of and replace the top 2 inches of affected plants’ soil with sterile potting mix. To deter fungus gnats from seeking refuge (and food) in the soil again, you can also add a 1/2-inch layer of diatomaceous earth or sand on top of the new soil.

Apple Cider Vinegar Trap

how to get rid of fungus gnats bowl of apple cider vinegar

If you prefer to avoid applying insecticides of any kind to your plants, luring gnats away from them with a mixture of apple cider vinegar and dish soap is likely the best way to kill them.


– Shallow container
Apple cider vinegar
Dish soap
Potting mix (optional)
Sand or diatomaceous earth (optional)

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

STEP 1: Make a homemade gnat trap.

In a shallow container at least 1/4 inch deep, such as a jar lid, bowl, or dish, pour a mixture of one part water to one part vinegar to which you’ve added a few drops of concentrated dish soap. The vinegar will attract adult fungus gnats, while the dish detergent will eliminate any that enter the dish.

STEP 2: Move the apple cider vinegar trap into place.

Place your DIY gnat trap near an affected plant, or even atop its soil. Once gnats are lured into the mix by the vinegar, the soap should clean their clocks, and you’ll get an idea of the infestation’s full extent as the trap collects gnats. Dump, clean, and replace the apple cider vinegar, water, and soap mixture every day or two, or as needed.

STEP 3: Replace the top layer of soil (optional).

The shortcoming of this apple-cider trap method is that it doesn’t attack fungus gnat larvae or eggs in a houseplant’s soil. For that reason, it’s recommended to properly discard and replace the top 2 inches of potting mix after you notice a significant decrease in the number of gnats caught in the trap. This will get rid of any unseen fungus gnat eggs before they can hatch. Then, you can add a 1/2-inch layer of sand or diatomaceous earth on top of the soil surface for added protection.

how to get rid of fungus gnats

Mosquito Dunk

Since traps don’t affect soil-bound larvae, a mosquito dunk containing Bti, the beneficial bacteria Bacillus thuringiensis subsp. Israelensis, may do the trick. You can also try a drench with azadirachtin, an insecticide derived from neem oil that lacks that substance’s greasiness. Follow the manufacturer’s instructions closely when using either substance.


Mosquito dunk
Azadirachtin insecticide (optional)
Potting mix
Sand or diatomaceous earth

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

STEP 1: Soak and apply mosquito dunk to the soil.

Soak a mosquito dunk containing Bti in a gallon of water overnight. The next day, use that water as a continuing drench into the potting soil.

STEP 2: Mix azadirachtin pesticide with water (optional).

Follow the product label to prepare the azadirachtin pesticide for use. The recommended rate is usually about 1 tablespoon of azadirachtin per 1 gallon of water. If you’d rather make less than a gallon of the solution, an approximate equivalent would be 1 teaspoon of concentrate per 5 cups of water.

STEP 3: Apply the azadirachtin solution to the soil (optional).

With the azadirachtin mixed according to the manufacturer’s instructions, pour an even amount of the solution across the soil surface to kill any present fungus gnat larvae.

STEP 4: Replace the top layer of soil.

Properly discard the top 2 inches of soil and replace it with fresh, sterile potting mix to get rid of any remaining fungus gnat eggs and larvae. If desired, add a 1/2-inch layer of sand or diatomaceous earth to keep new infestations from occurring.


how to get rid of fungus gnats

If you don’t have pets and are looking for  how to kill fungus gnats safely, consider 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.

Note that fungus gnat larvae won’t be affected by this treatment method, so the insecticide will need to be reapplied frequently to be effective. These instructions generally apply to using pyrethrin to get rid of fungus gnats, but defer to the manufacturer’s instructions in all cases.


Pyrethrin insecticide
Potting mix
Sand or diatomaceous earth

STEP 1: Mix the pyrethrin concentrate with water.

If you’re using a pyrethrin concentrate rather than a pre-mixed spray, combine it with water according to the product label directions. In the case of Bonide’s concentrate, mix 1 tablespoon of pyrethrin insecticide into a suitable spray bottle that contains a little over 3 cups of water. When handling any insecticides or pesticides, it’s always recommended to wear appropriate safety equipment like gloves, eye protection, and a face mask.

STEP 2: Spray the foliage and soil of affected container plants.

Holding the spray bottle between 1 and 2 feet away, apply the pyrethrin mixture to the leaves and topsoil layer of fungus gnat-infested plants. Take care to spray both the tops and undersides of leaves, but don’t overly drench the plant or the soil surface.

STEP 3: Reapply the mixture as needed.

Repeat this pyrethrin fungus gnat treatment until all signs of infestation, including flying adults and larvae and eggs in the soil, disappear. This may take some time, especially if several houseplants are in quarantine for these pests. To get rid of fungus gnats faster, consider using this method in addition to the above alternatives.

STEP 4: Replace the top layer of soil.

It’s also a good idea to get rid of that infested top layer of potting soil—just in case! Remove and discard the top 2 inches of soil outdoors, and replace it with fresh, sterile potting mix suited to your houseplant. You might want to also sprinkle about 1/2 inch of sand over the soil surface. Fungus gnats aren’t fond of sand, since it dries out quickly and contains none of the organic debris they crave. For an even drier alternative, try a layer of diatomaceous earth, a natural desiccant and insecticide.

How to Prevent Fungus Gnats

how to get rid of fungus gnats woman repotting plant

Once a gnat infestation is controlled, there’s still a good chance they’ll return if you don’t take proper fungus gnat prevention measures. Carefully discarding the topmost layer of potting soil outdoors and replacing it with sterile mix is only part of how to prevent fungus gnats in houseplants. The above gnat treatment methods will be most effective if you also take the following steps:

  • Let houseplant soil dry out to a depth of 2 inches before watering. Fungus gnats like to lay their eggs in damp, overwatered soil, and their larvae usually inhabit the top few inches of topsoil. This makes them especially prolific during winter when gardeners continue their usual summer watering routine. Don’t let soil dry out completely, however, or you might end up killing your plants in the process. Pouring water into the trays in which seedlings or houseplants are nestled and allowing hydration to be absorbed through the plant containers’ lower drip holes, is another way to keep the top layer of soil dry. This method is called bottom watering.
  • Always use sterilized potting soil to pot plants. Additionally, keep extra soil inside of a closed container after opening its bag, and don’t mix compost into your potting soil unless it’s been completely finished and sterilized.
  • Solarize potting soil and compost to sterilize it. To do so, place soil inside of a sealed plastic bag and pat it flat so that it is no more than 8 inches deep. Lay it on a raised location in the sun for at least a month—or two months or longer in cloudy places.
  • Repot houseplants with new potting soil frequently. Although fungus gnats live outdoors, too, they generally don’t cause problems in open spaces. Repotting indoor plants gives fungus gnats fewer opportunities to overtake containers.


There are several things to account for when it comes to killing fungus gnats, so you’re not alone if you are still uncertain about how to go about it. Check out these answers to common questions about fungus gnat treatment.

Q. What natural or organic methods can I use to get rid of fungus gnats?

There are natural insecticides, including pyrethrin and azadirachtin, that effectively treat fungus gnats at various life stages. Other natural ways to get rid of fungus gnats involve setting out sticky traps or a homemade gnat trap using one part apple cider vinegar, one part water, and a few drops of dish soap.

Q. What causes fungus gnat infestations?

Fungus gnats are attracted to moist soil and planting media, which is why overwatering houseplants is perhaps the most common cause of fungus gnat infestations.

Q. Should I dispose of infested soil in my potted plants to get rid of fungus gnats?

Yes, disposing of the top 2-inch layer of potting soil is an important aspect of getting rid of fungus gnats. Replace that soil with new, sterile potting mix suited to the particular plant, and consider topping it with a half-inch of sand or diatomaceous earth to make the plant less hospitable to the bugs..

Final Thoughts

Although gnats and their slimy offspring look less than natty, they generally aren’t as harmful as other “bad bugs.” Gnats are a natural part of our ecosystem, but it’s also natural to not want them flitting around your home and snacking on your plants. Although you might never completely get rid of fungus gnats outside or eliminate them from your houseplant collection, follow some (or all) of the above suggestions to keep their numbers low enough that they are less bothersome.