Fungus gnats are an annoying pest that thrive in damp conditions. If your potted plants or garden beds are infested with small black flies, you may be facing this problem. Keeping soil dry is the number one way to get rid of fungus gnats. If the problem is severe, you can also use a variety of traps, insecticides, and other controls to reduce the gnats. Be persistent, and you can soon be rid of this pest.

Method 1
Method 1 of 2:

Treating the Soil

  1. 1
    Keep soil fairly dry. Fungus gnat larvae thrive in wet soil. If you have plants that you water in pots or in your yard, don’t do so excessively. Many plants only need to be watered infrequently. If you aren’t sure how often to water your plants, do an internet search or consult a gardening guide for recommendations for each type of plant.[1]
    • If you area gets a lot of rainfall, or has soil that drains slowly, you may need to water even less frequently.
    • Soil should dry at least a little between waterings. If soil is visibly wet or damp, you should probably wait to water it.
  2. 2
    Clear organic debris from soil. Dead leaves, flowers, grass clippings and other debris all help fungus gnat larvae develop. On a regular basis, clear out any debris from potted plants, garden beds, etc. and discard it.[2]
    Advertisement
  3. 3
    Add sand to soil. If your soil continues to be overly-wet even after you make sure not to over-water it, you may need to alter the soil composition. Mixing regular sand (available from garden or some supply stores) into the upper layer of potted soil or garden beds can help keep it dry and prevent the growth of larvae.[3]
  4. 4
    Treat commercially-produced soil before using it. Some packaged types of potting soil and topsoil may inadvertently include fungus gnat larvae. Treating the soil with heat before using it will kill the larvae and prevent the spread of gnats.[4]
    • Heat your soil in the oven for half an hour at 160° F (71° C).
    • Avoid heating your soil using a tarp and solar energy outdoors, which may invite more pests.
  5. Advertisement
Method 2
Method 2 of 2:

Controlling Adult Gnats and Larvae

  1. 1
    Set yellow sticky traps out. These can be found in any garden center. Egg-laying adults will be attracted to the yellow paper and then get stuck. Place several sticky paper traps in your potted plants or garden. Remove the traps when they are covered in flies and they will be unable to lay eggs.[5]
  2. 2
    Set out a trap for adult flies. Vinegar (or beer) will attract and kill adult gnats. All you have to do is set out a few homemade traps.[6]
    • Pour ordinary vinegar (or beer) into several jars with lids.
    • Add a few drops of dish soap to the liquid. Close the lids and poke several holes into them.
    • Leave the jars scattered throughout the area infested by gnats. The adults will fly into the jars and die.
  3. 3
    Try cinnamon to kill the larvae. Cinnamon is a natural fungicide. It will kill the fungus that the larvae feed on, essentially starving them to death. Simply sprinkle cinnamon on the surface of the soil in your potted plants or garden beds.
  4. 4
    Use pyrethrin spray. A variety of pesticides containing pyrethrin are available at gardening and home supply stores. These can kill adult fungus gnats, but not larvae. Since fungus gnats breed rapidly, new adults will appear each day. This means that you will have to repeat sprays every day for several weeks to control the gnats.[7]
    • Pesticide sprays containing bifenthrin and cyfluthrin can also work.
    • Always follow the instructions and safety recommendations provided with the pesticide spray.
  5. 5
    Try biological controls. A variety of other organisms, such as nematodes (roundworms), rove beetles, and certain bacteria will kill fungus gnats or their larvae. These are commercially available and sold as gnat, mosquito, or fly controls.[8]
  6. 6
    Use diatomaceous earth. Place a thin layer of diatomaceous earth—a naturally occurring sediment—over top the top of your soil. A layer about 1 inch (2.5 cm) thick will prevent gnats from laying eggs in your soil. D.E., as it’s known, can be purchased at any plant supply store or nursery.[9]
  7. Advertisement

About This Article

Lauren Kurtz
Co-authored by:
Professional Gardener
This article was co-authored by Lauren Kurtz. Lauren Kurtz is a Naturalist and Horticultural Specialist. Lauren has worked for Aurora, Colorado managing the Water-Wise Garden at Aurora Municipal Center for the Water Conservation Department. She earned a BA in Environmental and Sustainability Studies from Western Michigan University in 2014. This article has been viewed 44,433 times.
38 votes - 97%
Co-authors: 4
Updated: January 10, 2022
Views: 44,433
Article SummaryX

To get rid of fungus gnats, control the adult gnat and larvae population by setting yellow sticky traps in your potted plants or garden. Additionally, you can pour vinegar or beer into several jars with lids, add a few drops of dish soap, close the lids, and poke several holes into them to attract the adult flies. For a natural fungicide, sprinkle cinnamon on your potted plants or garden beds. To learn more tips from our Horticulturist reviewer, including how to treat the soil, keep reading!

Did this summary help you?
Advertisement