How to Get Rid Of Fungus Gnats in Plants (Indoors & Outside)

​I always ask my readers what their biggest pain point is when it comes to growing veggies. How to get rid of fungus gnats is always at the top of the list!

Fungus gnats are those tiny black flies on plants that gather around pots and windows. If you grow indoors or outside, you’ve probably seen them.

The adults don’t cause any particular harm to plants, but they do lay eggs. Fungus gnat eggs and larvae cause damage because they feed on plant roots and stunt growth.

In my experience, the right neem oil for gnats and a combination of other organic methods work best. This guide covers how to get rid of gnats in plants naturally so that you can prevent eggs from hatching or get rid of fungus gnats that are already there.

Where Do Gnats Come From?

where do gnats come from
Fungus Gnat Larvae

Gnat eggs and pupae can reside in the mixes we use to start our seeds and grow our plants. They love that moist, organic media.

A generation of fungus gnats can be produced in about 17 days. [source] This number may vary, depending on temperature (eggs hatch in 3 days at 75 degrees Fahrenheit).

​Fungus Gnats Potato Test

fungus gnats potato test
Potato Attracts Fungus Gnat Larvae

​If you want to confirm that you have fungus gnat larvae in your potting mix, use slices of potato. ​Larvae are attracted to potatoes​, and they’ll leave the soil to feed on it. ​

  1. Slice a potato into thin slices and leave them on top of the soil line.
  2. Wait 2 to 3 days.
  3. Check your potato slices for larvae. They look like tiny, moving seeds with black heads.
  4. Throw the infested potato slices away.

​​If you discover larvae, use the prevention and control methods​ below to get rid of them.

​Getting Rid Of Gnats In House Plants

gnats in house plants

​​A fungus gnat’s life cycle is brief, and many generations can occur within a short window. Consequently, this is why you can have an infestation very quickly.

Further, fungus gnats spend about 10 days in the larvae and pupae stage (when root damage ​happens). That’s why ​you want to start getting rid of them immediately.

You can use the prevention method below before and after your plants germinate.


Grow Hot Peppers is reader-supported. When you buy through links on our site, we may earn a monetary commission. Learn more.


Fungus Gnats Neem Oil Spray (Organic)

  1. ​Pour a quart of water in a spray bottle.
  2. Add a TSP of neem oil with Azadirachtin. Azadirachtin is the most active ingredient in neem for killing pests.
  3. Squeeze a few drops of dish soap. Add a couple drops of peppermint oil too, if you have it. (Pests don’t like the smell of peppermint.)
  4. Shake up your bottle to mix the ingredients.

» Related: Azadirachtin In Neem Oil

​If Your Seeds Haven’t Germinated Yet

Here’s how to kill fungus gnats before your seeds sprout.

  1. ​Move your containers away from the grow lamp (if applicable) so you don’t inadvertently spray your lights and dull them.
  2. Spray ​the tops and bottoms of your containers, as well as the plant trays. Really soak these areas so beads of water sit on the top of the surfaces where fungus gnats can potentially be.
  3. Repeat the spray process every 3 to 4 days over a 10 day period. This ​ensures you apply this treatment over ​the time​ frame when fungus gnat larvae is likely to hatch and emerge.

(Gary from The Rusted Garden also says you can hydrate your starting mix with boiling water, as eggs seem to be in all starting mixes.)

If Your Seeds Have Germinated

  1. ​​​Wait until your grow light turns off for the night (if applicable). (I don’t recommend spraying anything on seedlings while they’ll be in the light because they can potentially burn.)
  2. Spray a small area of your seedlings and wait 48 hours to ensure they don’t have a bad reaction.
  3. Spray the container tops and bottoms, plant tray and tops and undersides of your seedling leaves.
  4. Repeat the spray process every 3 to 4 days over a 10 day period.

» Related: How to Care for Pepper Seedlings after Seeds Sprout

Still Seeing Adult Fungus Gnats Indoors?

Here are a couple of solutions:

  1. ​Use yellow sticky traps. These traps will capture the adults and prevent them from breeding.​ (I don’t use these outside because they have the potential to ​kill beneficial insects.)
  2. Point a small fan ​away from your plants. ​Gnats are small and can be blown away by the air flow.
  3. Sprinkle cinnamon on the top layer of soil. (More on cinnamon below.)

​How To Get Rid Of Gnats Outside

how to get rid of gnats outside
Fungus Gnat Trap

Here are a couple of ways to get rid of fungus gnats in plants that are outdoors.

Make Fungus Gnat Traps

  1. ​Fill a shallow container with a little bit of apple cider vinegar. (I used ​the scoop from my protein shake and added ~ 1 TBSP of the vinegar.)
  2. ​Add a couple drops of peppermint oil. (Optional)​​​
  3. Add a couple drops of dish soap.
  4. Mix the liquid and leave your container near the plants where you​ see the fungus gnat activity. Be sure to replace the trap solution, as necessary, until the gnats are gone.

Spray An Organic Neem Oil Spray

  1. Make a batch of neem oil spray.
  2. Wait till the sun goes down, and then spray a small, leafy area of your plants as a test. ​After 48 hours, check to make sure your plant doesn’t have damage. (It shouldn’t, this is just a precaution).
  3. ​Wait till the sun goes down. Spray the leaves, stems and tops of the soil.
  4. ​Continue to spray every ​3 days for about a week or more. Keep in mind, adult gnats can hang around for 7 to 10 days, so you’ll want to spray just as long to ensure you kill all the gnats during this time span.

More On Neem Oil For Gnats

neem oil for gnats

​Recently, I discovered that there are different types of neem oil. (Neem is a naturally occurring pesticide derived from seeds of the neem tree.)

​The ​best neem is one that is “cold-pressed” ​​and has “Azadirachtin” as it’s main ingredient. Azadirachtin is the most active component for killing pests like fungus gnats.

Azadirachtin ​in neem oil acts as a pest repellent in that it interferes with the pest’s hormone system so that it loses the desire to eat. The pest never gets to mature or lay eggs, and it eventually dies.

Many commercial neem products are processed in a way that actually removes the Azadirachtin. What you’re left with is typically a “clarified hydrophobic extract of neem oil.”

​This type of neem can eliminate pests on contact, ​but it’s not as effective because you won’t get the repellent benefits of Azadirachtin.​ ​Despite this huge difference, all products are still labeled as “neem oil.” Here’s the neem oil with Azadirachtin that I use.

Bti For Fungus Gnats

Bacillus thuringiensis subspecies israelensis (Bti) is a naturally occurring bacteria that kills pests like fungus gnats and mosquitoes. It’s not the same as Bacillus thuringiensis (Bt), which controls bugs like worms and caterpillars.

Bti is toxic to fungus gnat larvae so they’ll die before they have a chance to hatch. Common Bti products are Mosquito Bits and Mosquito Dunks. Generally, you add the product to water, let it dissolve and then water your plants with it.

Bti products need to be continuously reapplied to be effective (generally every 14 to 30 days). Keep in mind it may take several days to see results.

Beneficial Nematodes For Fungus Gnats

beneficial nematodes for fungus gnats

Steinernema feltiae is ​known as a “parasitic nematode” ​or “beneficial nematode.” It’s particularly effective when ​temperatures range from 60 to 90 degrees Fahrenheit and conditions are moist.

​Once applied to the soil, these nematodes go to work by ​seeking out larval and pupal insects (in this case fungus gnats) and feeding on them. They destroy them from the inside out and move on, all the way reproducing in numbers. 

The benefit of using nematodes is that once established, they provide season-long control.

By the way… If you’re looking for organic ways to keep your pepper plants safe, be sure to check out The Chile Plant Hospital. This ebook helps you diagnose and treat common problems, such as insects and deficiencies, so you can fix things before they get out of hand.

Managing Fungus Gnats With Cinnamon

fungus gnats cinnamon

Cinnamon is a natural fungicide, which kills the fungus that fungus gnat larvae feed on. It takes longer to work, but cinnamon creates an inhospitable environment for pests and also prevents damping off.

Sprinkle an even layer of cinnamon over the soil once or twice a week. This is another chemical-free way to get rid of fungus gnats, and it smells great!

​​More On Preventing Fungus Gnats

Here are more tips to keep in mind as you take care of your plants.

Reducing Moisture 

  • ​Don’t overwater your plants
  • Provide good drainage (you can add more perlite or sand to your potting mix.)
  • Allow the ​top of your container ​mix to dry between waterings
  • Clean up any standing water or fix leaks.

​Removing Organic Matter

  • ​Clean up ​nearby organic debris so fungus gnats don’t start feeding or breeding in it.
  • Do not use organic matter that isn’t completely composted. Unless pasteurized, the matter can potentially be infested with gnats.

Managing Infested Plants

  • ​Keep any affected plants away from​ everything else. Fungus gnats spread quick! (I know from experience.)
  • Potentially get rid of infested plants. Sometimes that’s the best option when things get out of control.

What’s Next?

​​I hope this information helps you understand how to get rid of fungus gnats. Check out this Amazon page for all the products mentioned in the​ steps. (See “Pest & Disease Supplies” box.)

Related Posts:

Photo of author

AUTHOR

Jenny is the creator of Grow Hot Peppers as well as the writer of the gardening guides and many recipes on this site. She’s been growing peppers and all kinds of veggies for over 10 years. When she’s not writing or gardening, she loves eating spicy foods, hiking and going to the ocean.