Get rid of fungus gnats for good – effective home gardener fixes

Fungus gnats are a real nuisance, and if you leave a fungus gnat infestation untreated, you can set yourself up for a problem in the future.

Here is my tried and tested 3-step method to eliminate a fungus gnat infestation.

1. Set up sticky traps
2. Cover the surface of the soil with a layer of sand or stones
3. Perform a hydrogen peroxide/water or Neem oil/water drench of the plant’s root system

Now step back and observe for a week or two. If the fungus gnat infestation persists, go through all three steps again.

Early prevention and treatment are critical to all things related to pests and diseases. I have found that treating plants for fungus gnats before the problem gets too severe is vital in getting rid of the issue on the first attempt.

Should the infestation be a bit more severe, you may need to go through several cycles to get rid of the fungus gnats for good.

Problems with cats in your garden beds? Learn from a cat-lover how yuou can get rid of feral cats without costly commercial products: Keeping cats out off the vegetable garden (by a cat lover)

Step 1. Set up sticky traps

While it’s essential to rid your plants of fungus gnats, the flies do not harm them. This does not, however, mean that they are harmless. 

Fungus gnats are the direct cause of many problems. They lay the eggs that eventually hatch into the larvae, damaging the roots of your plants.

And this is why every fungus gnat caught in a trap is a small victory. 

Fungus gnat caught in sticky paper trap
Fungus gnat caught in a trap

Step 2. Cover the soil with sand or stones

Fungus gnat eggs and larvae thrive in wet and moist soil. Covering the soil with a 1-2 cm (½ inch) layer of stones or coarse sand will effectively deny the fungus gnats access to the moist soil they need to grow and thrive. 

Using small stones like driveway shingle or pebbles work well when covering the soil. Sand tends to “disappear” as it becomes part of the soil over time.

The key here is that stones and sand drain and dry quickly, leaving the fungus gnats an unwelcoming and dry environment.

Step 3. Perform root system drench

The last of the 3 steps is directed at attacking and killing any fungus gnat infestation in the soil.

And we do this by drenching the plant with a solution that will clean the soil of fungi and kill any fungus gnat larvae in the soil. 

You can use a water and hydrogen peroxide (3%) solution or a Neem oil and water solution.

Use hydrogen peroxide to kill fungus gnats

Treat your plant with hydrogen peroxide by following these simple steps:

  1. Let the infested plant dry out
  2. Mix 1 part hydrogen peroxide (3%) with four parts water
  3. Drench the plant and let the excess runoff

Please note that we always use the readily available 3% hydrogen peroxide.

Observe the plant over the next week or two.

Does Neem oil kill fungus gnats?

We find Neem oil mixed with water very effective in getting rid of fungus gnat infestations.

But it does help to start your Neem oil treatment before the fungus gnat infestation gets too severe.

Use Neem oil water solution to kill fungus gnats
Use diluted Neem oil to kill fungus gnats

There are many different types of Neem oil products in the market. Follow the instructions on your Neem oil packaging.

  1. Let the plant you are treating dry out
  2. Mix Neem oil with water and ecologically friendly dishwasher detergent
  3. Drench the plant using the mixture and let any excess runoff

We use 100% cold-pressed pure Neem oil and mix our solution per the instructions below:

  • 5 ml Neem oil 
  • 1 liter of water 
  • about one tablespoon of ecologically friendly dishwasher detergent.

But again, you should dilute the Neem oil with water per your product manufacturer’s directions. 

How do you know you have a fungus gnat problem?

As with all pests and diseases, you want to catch the problem early on. And visual inspection is, of course, one of the easier ways to detect small flies in the air.

Pay special attention when top watering your plants, as it will disturb the flies and cause them to fly off. 

But besides visual inspection, you should also set up traps right from the beginning of the season. Yes, set up the traps before the growing season starts.

Now observe and see if you catch any fungus gnats. And when you do, consider starting the treatment early to avoid facing a fungus gnat infestation.

I use two different types of fungus gnat traps

1. Yellow sticky fungus gnat traps

Once a year, I buy a pack of yellow sticky paper traps from an online retailer. I place these yellow sticky traps strategically in pots, containers, and grow bags taking care not to touch the plants.

2. Apple cider vinegar fungus gnat traps

The idea of an apple cider vinegar trap is to create a mixture that will attract the fungus gnats. The fungus gnats will attempt to land but will get caught and drown.

I use a plastic PET bottle, apple cider vinegar, a few pieces of sweet fruit, and a few drops of washing-up liquid detergent to make our apple cider vinegar traps.

7 steps to making a fungus gnat apple cider vinegar trap (video below)

  1. Remove the cap from a plastic bottle
  2. Draw a line ⅓ from the top of the bottle
  3. Cut the plastic bottle along the marked line
  4. Put 3-6 cm / 1-2 inches of apple cider vinegar in the bottom part of the bottle
  5. Add a couple of small pieces of sweet fruit to the apple cider vinegar
  6. Put 1-3 drops of washing-up liquid detergent in the apple cider vinegar and stir gently.
  7. Place the top half of the bottle inside the bottom half – pointy side down

Your trap is now complete and ready to be placed among your plants. Be careful not to mix in the washing-up liquid detergent too aggressively – you do not want foam or bubbles to form. 

The role of the washing up liquid detergent is to break down the surface tension of the apple cider vinegar making it impossible for the fungus gnats to land on the surface. 

How to avoid problems with fungus gnats

When it comes to pests and diseases, there is only one thing that beats early detection, and that is prevention.

And there is a lot you can do to minimize the risk of attracting pests like fungus gnats. 

Here I will list methods and good habits that will help protect your plants and the growing environment against fungus gnats and many other pests and diseases.

1. Do not overwater 

Fungus gnats thrive in damp soils, and you should not overwater your plants. 

This is especially true during times of the year when plants use less water, like winter or early spring. Also, avoid over-using organic materials like peat moss and vermiculite that retain water and moisture exceptionally well. 

Peat moss is controversial among gardeners as it is a non-renewable resource with a less than favorable carbon foorprint. I buy in bulk but when my current supply of peat moss runs out, I will stop using peat moss for other sutainable and more environmetally friendly alternatives. 

2. Allow soil to dry out between each watering

Fungus gnats lay their eggs in moist soil, and these eggs later develop into larvae that feed on the root system of your plants. 

But the eggs and larvae cannot live in dry soil. When you allow the soil of your plants to dry out between waterings, the eggs, and larvae will die.

Don’t let your herbs and vegetables dry out to the point where they wilt or look distressed. But it is safe to let the top layer of soil in any pot, container, or grow bag dry out between waterings.  

3. Bottom watering beats top watering

When possible, always opt for bottom watering your plants to avoid the top of the soil getting overly damp and moist.

Place the pot in a large container with water to bottom water plants. Allow the plant to absorb water through the drain holes in the bottom of the pot. 

Remove the plant from the water bath when the soil changes color. 

Now place the plant where it can drain off any excess.

4. Avoid high levels of humidity

Watering plants in combination with high temperatures can lead to high humidity levels. 

This humidity will keep the soil damp and moist for the fungus gnats to thrive and develop.

We sometimes get problems with high humidity levels when the weather breaks from cold to warm. Typically, nights are cold, but days are warm. 

As nights are cold, windows are closed to protect our plants. But this also leads to poor air circulation when the temperature heats up during the day. 

And sometimes, high levels of humidity catch us by surprise.

5. Potting soil that drains well

Soil that drains well typically dries more quickly. And as the soil’s surface dries first, the fungus gnats find themselves without damp soil. 

I cannot stress the importance of soil that drains well. 

And I still maintain that more seeds, seedlings, and plants die from overwatering than from drying out. 

6. Do not let plants sit in water

If your pots or containers are sat on a plate or saucer, always empty any excess collected after watering. 

Plants should never sit in the wet. 

This is also why it is vital to let pots drain after watering. You always want excess water to drain off. 

7. Use good-quality soil

It is easy to say, “always buy new soil and never reuse old soil.”

And if it is an option for you, great. Always using new and fresh soil is a good thing.

But we reuse soil all the time. We will, of course, improve the soil before reusing it. But it just gets too expensive for us to buy new soil for all our herbs, vegetables, and plants every time we pot up, plant, or transplant. 

And we have found a method that works for us. Problem soil, where we have had problems with fungus gnats, is placed in a sealed plastic container. The container is placed in full sun for at least four weeks. 

The process is called solarization [1] and is a non-chemical process for getting rid of soil-borne pests and diseases.

We cannot use the soil straight away, but we can reuse it, which saves us a lot of money.

Fungus gnats and what to do when all else fails

It is important to remember that you can do everything right and still suffer from fungus gnat infestations. After all, a fungus gnat only needs an open window to enter your growing environment.

And there can be times when an infestation has reached a stage where it is hard to treat effectively.

We always have sticky paper and apple cider vinegar traps on the go. And if needed, we typically drench the plants using a Neem oil and water solution.

If we still experience problems, our last step is to repot the plant and remove as much soil as possible from the plant’s root system. 

We then add new soil and top the soil with a layer of stone shingles.

So far, these tips, tricks, and methods have been enough to control the fungus gnat problems we encounter yearly.

Understanding the 4 stages of development of the fungus gnat

  1. The most effective way to fight off an infestation is to break the cycle that feeds the process.
  2. Fungus gnats go through 4 stages: egg, larvae, pupae, and adult flies.
  3. Eggs hatch in about 3 days, the larvae take another 10 days or so to develop into pupae, and finally, after an additional 4 days, the adult flies appear. [2] And the warmer it is, the faster the process. 
  4. This is why we have a 3 step process that attacks the mature flies and the soil-borne eggs and larvae simultaneously.

Again, it is critical to understand how it all fits together to be a successful gardener.

DIY fungus gnat traps to get rid of fungus gnats for good
Sticky paper fungus gnat trap protecting overwintering herbs in one of our greenhouses



Mattias Magnusson: Hello, I'm Mattias, a passionate and experienced gardening enthusiast. I am the creator of, your guide to year-round herb and veggie growing. Let's simplify green living, no matter your space or location.