How to Get Rid of Fungus Gnats on Houseplants

Home » Blog » How to Get Rid of Fungus Gnats on Houseplants

Robert Pavlis

Fungus gnats – the little buggers that find your houseplants. They love to visit seedlings and can even infest your larger houseplants. They fly all over the house and drive gardeners crazy.

In this post I will look at how to get rid of fungus gnats on houseplants and discuss various ways to control them and revel the ones that works best.

How to Get Rid of Fungus Gnats on Houseplants
How to Get Rid of Fungus Gnats on Houseplants

Understand the Fungus Gnat

People are always asking me how to control some kind of pest on their plants and my answer usually starts with, “identify the bug and then learn about its life cycle.” The life cycle describes the way the bug lives from egg to full adult. Without this knowledge, it is difficult to figure out the best way to control it.

Listening to other uninformed people on the internet does not work.

Identification of Fungus Gnat

People first notice fungus gnats because they fly around the plants and your head while you are tending the plants. The adult is a small, delicate, mosquito-like fly, about 1/8″ in size, with one pair of clear wings. They are not strong fliers and usually don’t venture too far from the plants.

Soil Science for Gardeners book by Robert Pavlis

You might also notice the larvae (or maggot) in the soil, but it is also quite small and usually stays underground. It has a black head and a whitish transparent body.

Fungus Gnat Life Cycle

Adults live for about a week and during that time they lay a couple of hundred eggs in moist soil. The eggs hatch in 4-6 days and the larvae feed on plant roots for about two weeks. They then pupate for 3-4 days before new adults hatch out.

The actual duration of the life cycle depends on temperature. Everything will be slowed down if you are growing seedlings in a cold basement.

Most of the time people don’t notice them right away and by the time you do, they have numerous flies in various stages of its life cycle.

Do Fungus Gnats Harm Plants?

Seems like a simple answer, but its not very clear how much if any damage they cause. The term fungus gnats does describe a number of species that are very difficult to identify without going through a special process. Some species seem to harm plant roots, but others live just on decaying organic matter. It is quite possible that your gnats are doing no harm to the plants.

Killing Fungus Gnats

Now that you understand the life cycle, it becomes clear why people report that some treatments don’t work. If you kill the fungus gnat flies, they just come back again, because the soil is full of larvae and pupae that have not hatched yet.

Building Natural Ponds book, by Robert Pavlis

On the other hand if you treat the soil to get rid of the larvae, it has no effect on the flies. You have to wait until they die of old age and in the mean time they are laying more eggs.

You have a couple of options. Kill the flies and larvae at the same time, which probably requires the use of two different techniques, or kill one and wait for the other to die of natural causes. Keep this in mind while we discuss the following potential solutions.

Keep Soil Dry

Keeping soil dry does two things. It makes it harder for existing larvae to survive and it discourages flies from laying new eggs. It does not get rid of existing flies.

Try to avoid soils containing peat moss as it tends to hold water longer than soil. Unfortunately almost all seedling mix uses peat moss. I doubt that coir is any better.

Drying the soil does work.

Yellow Sticky Traps for Fungus Gnats

Place yellow sticky traps near plants, and right on the soil surface. Flies are attracted to them, stick, and die. You can buy these or make them yourself.

The DIY suggestions online include coating with Vaseline, honey, glue, and motor oil. I asked if these work in Facebook groups and the answer is no. There is a commercial product called Tangle-trap that might work when it is applied to yellow cards. The commercial products do work to control and monitor populations but they won’t get every last fly.

Yellow sticky cards have no effect on eggs, larvae or pupae, but over a 2-3 week period you will get rid of most of them, as new flies hatch out.

Bacillus thuringiensis kills Fungus Gnats

Bacillus thuringiensis subsp. israelensis or Bti, is a naturally occurring soil bacteria that is toxic to a variety of insects. When it is eaten by larvae, it kills them.

Bacillus thuringiensis is available in various commercial products. A convenient one that is readily available is a product called Mosquito Dunks. Break it into small pieces, sprinkle a bit on the surface of the soil and water it in. Repeat in 30 days. They also work well in keeping mosquitoes from breeding in rain collection barrels.

This product is considered perfectly safe for humans and pets. It will slowly kill the larvae and therefore future flies. It will not get rid of the flies  that have already hatched or pupated.

Nematodes for Fungus Gnats

Nematodes can also be used, but not everyone reports good results with them. That is due to poor storage of the product, not because they don’t work.

First of all you have to get the right species of nematode, Steinernema feltia. 

Secondly, they have to be stored cold and they have a short life span. If you get them shipped, they need to be kept cold, but not frozen, during shipping. Big box stores and Amazon are not a good place to buy live biologicals because they don’t provide the storage needed.

For houseplants and seedlings, you usually need them in winter when nurseries are not open.

You can check to see if your purchased nematodes are alive. Put a small amount in a glass dish, add a couple drop of water at room temperature. Wait a few minutes and use a magnifying glass and a black background to check for activity. They should be swimming. If they are straight and still they are dead.

Cover Soil with Sand

Cover the surface of the soil with sand. The sand prevents flies from laying eggs in the soil. Some reports say it also prevent flies from hatching out, but I have my doubts about that.

If egg laying is stopped, the gnats should be gone in about 4 weeks.

One report suggested that covering with sand does not work, because the flies lay eggs in the drainage holes on pots. That makes sense, so you might want to cover them.

Changing All of the Soil

Drain fly, not to be confused with fungus gnat
Drain fly, not to be confused with fungus gnat

This makes no sense. If you have flies, they will just lay eggs in the new soil. If you have several plants you would need to change the soil in all pots, and wash all roots thoroughly. Don’t bother.

Drain Flies

You think you have fungus gnats, but do you? You might have drain flies.

Drain flies are a tiny fly that has a hairy body, and fairly large wings for such a small bug. They look more like a miniature moth than a fly and breed in the gunk found in drains. When they fly around they do look a lot like fungus gnats.

Before trying to solve your problem, determine if you have these guys. Cover drains with sticky tape, sticky side down, and wait a few days to see you catch flies. If you do, you have drain flies.

Fruit Flies

Fruit flies are also very similar and many people get them confused. Put out a dish of cider vinegar, or red wine, or even a piece of old fruit. If the flies are attracted to any of these, they are fruit flies, not fungus gnats.


  1. Image of fungus gnat, by gailhampshire:
  2. Image of drain fly, by Judy Gallagher:



If you like this post, please share .......

Robert Pavlis

I have been gardening my whole life and have a science background. Besides writing and speaking about gardening, I own and operate a 6 acre private garden called Aspen Grove Gardens which now has over 3,000 perennials, grasses, shrubs and trees. Yes--I am a plantaholic!

16 thoughts on “How to Get Rid of Fungus Gnats on Houseplants”

  1. Drats! I called the summerweight plant cover (see-through, with exceptionally tiny holes, lets air in, keeps pests out) by the wrong term. Did not use cloche cover, which is heavier fabric, plastic or glass.

  2. Thank you! So much misinformation on the internet – your science based info is such a antidote!
    I have fungus gnats in my bay laurel cuttings in 6″ pots that I brought in for the winter. I went whole hog and did everything suggested in the tips above. I cut circles of landscaping fabric to line the bottom of new, same size pots to keep the gnats from gaining entry through the drainage holes. I slide the plants out of the old pots and into the new pots and covered with sand and crumbled dunks and yellow sticky stiks, watered from the top until it ran out the bottom. Put them on a large tray with stakes to hold cloche fabric over them without touching them. I covered with the fabric and tucked it well under the tray to prevent escapes, and I put them under LED lights. I am spying on them often, waiting for several life cycles to see if this will be successful. So far, watering 2 weeks later through the Dunks crumbles has prompted hatching only 4 small and 2 tiny dot sized gnats trapped on the yellow sticky tape. It will get better because I won’t be fooled by crafty gnats…I will be patient and win the war.

  3. Did not know about the use of mosquito dunks. Thanks for the great info …also now understand where those gnats have been coming from which I couldn’t figure out.

  4. Hi Robert, I’m a plant and permaculture-aholic. BS in Chemistry, then commercial horticulture for 20 years, synthetic fertilizers, wasteful with water, but biological control only / unsprayed foliage and product. Doing it right from the staff & consumer perspective but unecologically sound, finally got it right when I took a “sabbatical.”
    I like your philosophy and commentary a lot, and took your cautions about drainage holes into account while trying to use sand to break the fungus gnat lifecycle. Caring for ~30 indoor plants at my residence, ~15 species, different rooms, light levels, watering patterns. Put a 1.5″ layer of coarse sand on everything, within 48 hours you could barely find a flyer. Ten days in now and I see one sporadically, but that could be larvae still going through their lifecycle, emerging as adults. Heeding your comment, I used a few plastic pots sitting around, covered up all drainage holes but one to minimize exposed soil surface area. So far I see no increased incidence of flyers for pots with multiple drainage holes or just the one. As far as fungus gnats go it’s an unambiguous success, makes me happy because I’m unwilling to use BtI and I don’t want artificially long periods between watering.
    Seems clear that potting adequately, thus allowing 7-10 days between waterings enhances success as the sand doesn’t dry immediately without mechanical air movement. Layer thickness partly chosen to prevent churning up soil, mixing with the sand layer. About to try scoria/sand mix for thinner layer.
    The only remaining question is whether sand impedes air/oxygen diffusion into the medium (and creates hydraulic resistance to evapotranspiration), especially when just wetted, and when I’ve plugged drain holes. Doesn’t seem that would be a problem yet my instincts tell me something may be a little off. Perhaps lack of forest products / sand particle homogeneity slows breaking of the water column, behaving like a perched table? I’ve read that washed #12-16 blasting sand is the best size for this, one could always screen a decent grade coarse horticultural sand for that result, faster draining/drying, less/no concern about gaseous diffusion. We’ll see, but so far it’s great, and my house feels more like I’m at the beach!

  5. There are also a few biological controls: rove beetles (Dalotia coriaria), nematodes (Steinernema feltiae) and predatory mites (Stratiolaelaps scimitus/Hypoaspis miles).

    I’ve only tried nematodes and they seemed to work since I didn’t notice any fungus gnats in the greenhouse last summer, though it was very hot so maybe the soil was too dry for them to flourish.

    • I wonder how available these are for gardeners? I have never seen them for sale in winter months but I have not gone out of my way to find them.

      • The nematodes are easily available here in the UK under the Nemasys and Neudorff brands, though they are mostly sold online rather than in gardening shops due to their limited shelf life. There are apparently products using the same nematode called Scanmask (US) and Entonem (Canada), but I don’t know of their availability. The mites I could get, but like the rove beetles they seem to be more for commercial greenhouse use.

        • They are available in Canada, but mostly sold through big box stores and places like Amazon. I doubt they ship refrigerated? I would not buy from them unless I was sure they arrive alive.

          • From my experience of buying from the Nemasys range from a few different sellers, the packets are sent unrefrigerated but need to be refrigerated on receipt and until using. The Neudorff brand apparently does not need to be refrigerated at all and have a shelf life of 6 months compared to Nemasys’ 4 weeks.

            I’ve just place an order for some predatory mites (Hyoaspis miles). According to the seller, the mites remain active for 4-5 months as long as there are sciarid larvae for them to feed on. They ended up being cheaper than Nematodes since I don’t have 60 square metres of pots to treat, and the seller only recommends Nematodes for more severe infestations. It will be interesting to see how the mites get on!

  6. Currently experiencing an infestation of fungus gnats, I’m waiting for the traps I ordered to arrive.

    What are your thoughts on watering with a hydrogen peroxide solution in order to kill the larvae (in combination with yellow sticky traps for the adults)?

    • I doubt it works. Peroxide quickly breaks down into oxygen and water, especially near organic matter. In my review of the subject I found no reliable reference that says it works.

  7. Hi Robert I wish this was a week earlier. I believe the gnats came in a potted amaryllis I got from a nursery. They infested the pots of tulips bulbs I was forcing near by and kept ending up in my husbands tea. Keeping dry and adding half an inch of sand did help. Also spraying with insecticidal soap on the soil and stems and leaves reduced the adults. Last week they were so bad. I moved the amaryllis to another room took it out of the pot and put the soil out side in the freezing cold for a couple of days. I brought it in and baked at 425 in the oven for an hour let it cool and replanted. They have not been back on the amaryllis. The tulips had buds by then so I cut them off put them in a vase and put the stems and pots outside. I will get some mosquito dunks just in case they come back. Thanks for the info sounds a lot less work.


Please leave a comment either here or in our Facebook Group: Garden Fundamentals