Those tiny black flies hovering around your houseplants can be surprisingly difficult to ignore. If you are struggling with an indoor pest infestation and want to learn how to get rid of fungus gnats, you are not alone. You water your plants, move a pot, and suddenly several insects rise from the soil. You may even find them around your windows, desk, or kitchen.
If you are wondering how to get rid of fungus gnats, the most important thing to understand is that killing the flying insects alone will not solve the problem. Many of the eggs, larvae, and pupae remain in the growing medium, ready to produce another generation.
The good news is that most fungus gnat infestations can be managed without repeatedly spraying your plants with insecticides. By changing how you water, trapping adult flies, and treating the larvae when necessary, you can gradually bring the population under control.
This guide explains seven practical solutions, which popular remedies are worth avoiding, and how to prevent fungus gnats from returning.
What Are Fungus Gnats?
Fungus gnats are tiny, dark flies commonly found around the soil of indoor plants. Adult fungus gnats resemble small mosquitoes, with slender bodies, long legs, and delicate wings.
Their larvae live in moist potting media and feed mainly on fungi and decaying organic matter. Some species can also feed on fine roots and seedlings, particularly when populations are high.
For most established houseplants, adult fungus gnats are primarily a nuisance rather than a serious threat. However, heavy infestations can damage vulnerable seedlings and young plants.
Fungus gnats thrive when the growing medium stays consistently moist. Frequent watering, poor drainage, decomposing leaves, and old potting mix can create suitable breeding conditions.
How to Recognize a Fungus Gnat Infestation
Common signs include:
• Tiny dark flies hovering close to the soil surface.
• Flies emerging when you water or move a pot.
• Small black flies resting on nearby windows or walls.
• Pale, slender larvae with dark heads in damp potting media.
• Persistent insect activity around particular plant pots.
Do not confuse fungus gnats with fruit flies, which are often associated with ripe or rotting fruit, or drain flies, which may breed in moist organic buildup inside drains.
If the insects are concentrated around a drain rather than a plant, inspect that area before treating your potting soil.
Learn how to identify and control common indoor plant pests like fungus gnats by using organic neem oil and fixing your soil moisture.
How to Get Rid of Fungus Gnats: 10 Practical Solutions
The best approach combines methods that target different stages of the insect’s life cycle. Start with watering and sanitation, then add traps or a suitable larval treatment if needed.
1. Let the Soil Surface Dry Between Waterings
This is the first change to make in most fungus gnat infestations.
Fungus gnats prefer moist growing media because the conditions support their eggs and larvae. Allowing the upper layer of soil to dry makes the environment less suitable for continued breeding.
Here is how to do it:
1. Check the soil before watering rather than following a fixed daily schedule.
2. Allow the upper inch or two (about 2.5–5 cm) to dry when your plant can tolerate it.
3. Check moisture deeper in the pot when necessary, especially for larger containers.
4. Water thoroughly when the plant needs it, then allow excess water to drain.
5. Empty saucers and decorative outer pots so the roots are not left standing in water.
The correct drying period depends on the plant. Snake plants and many succulents tolerate more drying than peace lilies, ferns, and other moisture-loving species.
Do not dry out every plant completely just to kill gnats. Excessive drying can stress or kill plants that require consistently moist soil.
If a pot remains wet for an unusually long time, investigate its drainage, pot size, light levels, and growing medium. In some cases, a denser-than-necessary potting mix may be contributing to the problem.
Learn how to get rid of fungus gnats by mastering how to water indoor plants properly and choosing the best soil and potting mix for indoor plants.
2. Use Yellow Sticky Traps to Catch Adult Gnats
Yellow sticky traps attract and capture many adult fungus gnats. They are useful for reducing the number of flying insects and monitoring whether an infestation is improving.
However, sticky traps do not reliably eliminate the eggs, larvae, or pupae in the soil. They work best alongside moisture management or a treatment that targets the immature stages.
How to use sticky traps
1. Place a small yellow sticky card near the soil surface of each affected plant.
2. Position it where adult gnats are likely to fly, without allowing the adhesive to touch leaves.
3. Inspect the cards regularly.
4. Replace them when they become crowded with insects, dusty, or less sticky.
5. Compare the number of trapped insects over time to assess progress.
If one pot repeatedly catches more gnats than the others, inspect its soil closely.
Keep adhesive traps away from children, pets, and anything that could become stuck to them.
3. Treat Soil Larvae With Bti
If gnats continue appearing despite improved watering, consider a product containing Bacillus thuringiensis subsp. israelensis (Bti).
Bti is a bacterium used in certain biological insect-control products. When susceptible larvae ingest it, the treatment disrupts their feeding and kills them.
Products containing Bti may be sold under different brand names, depending on the country and formulation. Some products marketed for mosquito larvae, including certain Mosquito Bits formulations, contain Bti, but not every mosquito-control product is suitable for houseplants.
Before buying a product:
• Check that Bti is listed as an active ingredient.
• Confirm that the product directions permit the intended use on or around the relevant plants.
• Follow the specified preparation, application, and storage instructions.
• Avoid increasing the concentration in an attempt to obtain faster results.
Bti targets susceptible larvae, not the adult flies already flying around your room. Repeated applications may be necessary to catch newly hatched larvae, depending on the product label and infestation.
Keep using sticky traps to monitor adult activity while the larval population declines.
For readers who prefer to avoid conventional insecticides, Bti can be a useful targeted option when used according to its label.
4. Remove Dead Leaves and Other Organic Debris
Fallen leaves, dead flowers, decaying roots, and other organic material can support fungi and provide food for fungus gnat larvae.
Cleaning the soil surface will not eliminate an established infestation on its own, but it helps remove conditions that encourage the problem.
Take these steps:
• Pick up fallen leaves and dead flowers from the soil surface.
• Remove decaying plant material from saucers and outer pots.
• Clean spilled potting mix from shelves and the area around the plants.
• Check for persistently damp organic debris near your indoor garden.
• Avoid leaving decomposing plant material in pots unnecessarily.
If you keep several plants together, inspect the entire group rather than treating only the pot where you first noticed a fly.
A clean growing area makes it easier to identify the actual breeding source and monitor the results of your treatment.
5. Improve Drainage and Replace Problematic Potting Mix
Sometimes the main problem is not simply how often you water. The growing medium may be holding too much water or breaking down into a dense, poorly aerated mass.
This is particularly relevant in warm Nigerian homes, where plants in bright, well-ventilated rooms may dry at a very different rate from those kept in dim rooms or air-conditioned offices. Do not assume that every pot needs the same watering interval.
Check whether:
• The pot has drainage holes.
• Water can escape freely after watering.
• The container is excessively large for the root system.
• The mix stays soggy for days.
• The growing medium has become compacted or degraded.
If drainage is poor, consider moving the plant into a suitable container with drainage holes and using a fresh, well-draining potting mix appropriate for that species.
Repotting is not necessary for every infestation. Avoid disturbing healthy roots when improved watering and targeted treatment are likely to work.
When repotting is justified, remove as much of the old, problematic medium as the plant can safely tolerate. Clean the pot before reusing it, and dispose of the infested medium rather than spreading it among other plants.
You prevent fungus gnat infestations by learning how to repot indoor plants without damaging the roots during your next soil refresh.
6. Use a Dry Surface Barrier Where Appropriate
A suitable layer of coarse sand or fine gravel may help make the soil surface less accessible for egg-laying, provided the layer remains relatively dry and does not interfere with watering.
This is an optional supporting measure, not a guaranteed treatment.
If you try it:
1. First correct excessive watering and drainage problems.
2. Choose a clean material suitable for container plants.
3. Apply a thin, even layer over the soil surface.
4. Continue monitoring with sticky traps.
5. Remove the layer if it interferes with moisture management or plant health.
A surface barrier will not reliably kill larvae already living below it. It should not replace an appropriate larval treatment in a persistent infestation.
Also, do not confuse a surface barrier with placing gravel at the bottom of a pot. A gravel layer at the bottom is not a reliable solution for poor drainage.
7. Use Hydrogen Peroxide or Neem Products Only With Caution
Hydrogen peroxide and neem-based products are frequently discussed as home remedies for fungus gnats. However, neither should be treated as an automatic first choice.
Hydrogen peroxide for fungus gnats
Hydrogen peroxide can damage living organisms, and its effect depends on the concentration and application method. A solution that is too strong may injure roots or harm beneficial organisms in the growing medium.
Some extension guidance discusses diluted hydrogen peroxide as a possible treatment, but it is not necessary for most ordinary infestations when safer management options are available.
If you are considering it, do not pour concentrated hydrogen peroxide into your plant pots. Avoid applying it to seedlings or sensitive plants, and do not assume a homemade dilution is safe for every species.
Start with watering changes, sticky traps, sanitation, and a suitable Bti product when needed.
Neem oil for gnats
Neem products vary in formulation and intended use. A product designed for foliar pests is not automatically appropriate for drenching potting soil.
If you consider a neem-based treatment, check whether the product is specifically labelled for the intended pest and application method. Follow the label, and avoid treating plants under conditions that could increase the risk of leaf injury.
Neem oil should not be considered a guaranteed fungus gnat solution simply because it is plant-derived.
Discover how to use neem oil for plants to naturally eliminate pests like fungus gnats, spider mites, and aphids without harming your greenery.
8. Use Beneficial Nematodes to Target Fungus Gnat Larvae
Beneficial nematodes are microscopic organisms that live in soil and can help control fungus gnat larvae. One commonly used species is Steinernema feltiae, which seeks out susceptible insect larvae in the growing medium.
Unlike yellow sticky traps, which catch adult flies, beneficial nematodes target the larval stage before the gnats emerge as adults.
How to use beneficial nematodes:
1. Purchase a reputable product specifically intended for fungus gnat control.
2. Check the label to confirm the nematode species and the plants or growing media it can be used on.
3. Prepare and apply the product according to the manufacturer’s instructions.
4. Maintain the soil moisture conditions specified on the label so the nematodes can move through the growing medium.
5. Continue monitoring adult gnats with yellow sticky traps.
Beneficial nematodes may be particularly useful when several houseplants are affected or when an infestation persists despite better watering practices.
Keep in mind that nematodes are living organisms. Their effectiveness depends on correct storage, application, temperature, and moisture conditions. They may not be readily available in every Nigerian garden centre, so check the product’s availability and suitability before purchasing.
9. Inspect New Plants and Quarantine Infested Ones
Fungus gnats can enter your home through newly purchased plants or contaminated potting mix. If you treat your existing plants but introduce another infested pot, the problem may return.
Quarantine and inspection help prevent this cycle.
Follow these steps:
1. Keep newly acquired houseplants separate from your established collection for a short observation period.
2. Check the soil surface, drainage holes, and saucers for small flying insects.
3. Place a yellow sticky trap near the pot to monitor adult gnat activity.
4. Inspect plants that repeatedly attract gnats, even if they appear healthy.
5. Treat confirmed infestations before moving affected plants back into your collection.
When purchasing potting mix, choose a reputable supplier and inspect opened bags for excessive moisture, damaged packaging, or signs of contamination.
Quarantine does not kill fungus gnats already present in a plant, but it helps prevent the problem from spreading to other pots.
10. Use Bottom Watering Carefully to Keep the Soil Surface Drier
Bottom watering can help some houseplant owners manage fungus gnats by allowing water to enter through the drainage holes rather than repeatedly wetting the soil surface.
However, it is not a guaranteed treatment. Water can eventually reach the surface through capillary action, and the lower growing medium must not remain waterlogged.
How to bottom-water a houseplant:
1. Place the pot in a shallow container of water, ensuring the pot has drainage holes.
2. Allow the growing medium to absorb water for an appropriate period.
3. Remove the pot once the root ball has absorbed sufficient moisture.
4. Let excess water drain completely.
5. Empty the container and check that the pot is not left standing in water.
Use this method only for plants that tolerate bottom watering. Some species benefit from being watered from above, and occasional top watering may be necessary to flush accumulated mineral salts from the growing medium.
Most importantly, bottom watering does not eliminate larvae already living in the soil. Combine it with sticky traps, removal of decaying debris, and an appropriate larval treatment when necessary.
Do Apple Cider Vinegar and Dish Soap Traps Work for Fungus Gnats?
Many indoor gardeners try a small bowl of apple cider vinegar mixed with dish soap because this homemade trap is commonly recommended for fruit flies.
The problem is that fungus gnats and fruit flies do not respond to traps in exactly the same way.
Fungus gnats and apple cider vinegar
Apple cider vinegar traps are mainly associated with fruit flies. They are not a dependable method for controlling fungus gnats breeding in potting soil.
If tiny flies continue emerging from your plant pots while a vinegar trap catches very few, switch your attention to the growing medium.
Dish soap gnat traps
A bowl of soapy water may catch some insects that land in it, but it does not reliably target fungus gnat larvae in the soil.
Do not pour dishwashing liquid directly into your pots as a substitute for a labelled treatment. Household detergents vary in their ingredients and can damage plants.
The better choice is to use yellow sticky traps for adults and correct the soil conditions that support the larvae.
How Long Does It Take to Get Rid of Fungus Gnats?
You should not expect every flying gnat to disappear immediately after the first treatment.
Fungus gnats pass through several stages: egg, larva, pupa, and adult. Treatments that target one stage may leave other stages unaffected.
With consistent watering adjustments, sticky traps, and an appropriate larval treatment where necessary, you may begin noticing fewer adult gnats within days. However, controlling a persistent infestation can take several weeks.
The exact time depends on the severity of the infestation, the growing conditions, and whether all breeding sources have been addressed.
Signs That Your Treatment Is Working
Look for these changes:
• Fewer new gnats appearing around the pots.
• A gradual reduction in insects caught on sticky traps.
• No continuing emergence of large numbers of adults after watering.
• Improved soil moisture management.
• No new signs of root stress caused by overwatering or excessive drying.
Continue monitoring even after the room appears free of gnats. A short period without visible adults does not necessarily mean every immature insect has been eliminated.
How to Prevent Fungus Gnats From Returning
Once the infestation is under control, focus on preventing another breeding cycle.
Water according to the plant’s needs
Do not water every houseplant on the same schedule. Check the soil and consider each plant’s moisture requirements, pot size, light exposure, and the speed at which its growing medium dries.
Choose an appropriate potting mix
Use a container-growing medium that provides adequate drainage and aeration for the species. Avoid repeatedly reusing heavily infested or degraded potting mix.
Keep pots and trays clean
Remove dead foliage and empty excess water from saucers and decorative containers.
Inspect new plants regularly
Examine newly purchased or recently brought indoors plants for flying insects and signs of larvae. Keeping new plants separate from your existing collection for a few weeks can help identify problems before they spread.
Monitor with sticky traps
Yellow sticky cards can provide early warning of renewed adult activity. Investigate an increase rather than waiting until gnats become widespread.
Check nearby breeding sources
If gnats persist even after the soil has dried appropriately, inspect drains and other damp areas. Not every small fly inside a home originates from a houseplant.
Frequently Asked Questions
1. What is the fastest way to get rid of fungus gnats in houseplants?
Start by correcting excessive soil moisture, then place yellow sticky traps near affected plants. For persistent infestations, use an appropriate Bti product according to its label to target larvae in the growing medium.
2. Does apple cider vinegar kill fungus gnats?
Apple cider vinegar is not a dependable control method for fungus gnats. It is more commonly used to attract fruit flies. Yellow sticky traps are a better choice for monitoring and capturing adult fungus gnats.
3. How do I get rid of fungus gnats with hydrogen peroxide?
Hydrogen peroxide is sometimes suggested as a soil treatment, but it can damage roots and beneficial organisms if used improperly. Try moisture management, sticky traps, and an appropriate labelled larval treatment before considering homemade chemical mixtures.
4. Do sticky traps kill fungus gnat larvae?
No. Yellow sticky traps capture flying adults but do not reliably kill larvae, eggs, or pupae in the soil. Combine traps with measures that target the breeding environment.
5. Are fungus gnats harmful to indoor plants?
Adult fungus gnats are generally more of a nuisance than a threat to established houseplants. However, larvae can damage delicate roots and seedlings when populations are high.
6. Can overwatering cause fungus gnats?
Excessive watering contributes to fungus gnat problems by keeping the growing medium moist enough to support their development. However, the correct watering frequency varies between plants and growing conditions.
7. Will repotting get rid of fungus gnats?
Replacing heavily infested potting mix can help, especially when the medium is degraded or remains excessively wet. However, repotting every affected plant is not always necessary. Correcting moisture problems and treating larvae may be sufficient.
8. Can fungus gnats come from drains?
Yes. Some small flies breed in moist organic buildup inside drains. If insects persist after you address your plants, inspect nearby drains and other damp areas to identify their source.
Discover the 3 hardest indoor plant pests to get rid of and how to control them before an unmanaged infestation destroys your favorite greenery.
Conclusion
Getting rid of fungus gnats requires more than catching the tiny flies you see around your plants. The lasting solution is to reduce the conditions that allow them to breed and, when necessary, treat the larvae in the growing medium.
Begin with sensible watering, use yellow sticky traps to monitor adults, remove decaying debris, and consider a suitable Bti treatment if the infestation persists. Avoid relying on vinegar traps or untested homemade mixtures as your main solution.
With consistent care and a little patience, you can bring fungus gnat populations under control while protecting your houseplants’ roots and overall health.
Master indoor plant care for beginners with our complete guide, which covers everything from optimal watering schedules to choosing the perfect soil mix.

About the Author: Emebu Blessing Oghale
Emebu Blessing Oghale is an expert SEO content writer, digital creator, and indoor gardening enthusiast based in Asaba, Nigeria. Combining horticultural principles with years of digital media experience, he founded Indoor Plant Guide to provide practical, beginner-friendly troubleshooting tips for plant parents across West Africa and beyond. When he isn’t cultivating tropical houseplants, he serves his local community as a pastor at Living Faith Church.

Hi Emebu,
This is the second post I am reading in your plant guide article, I can also see that you published this article today, and I am the first to comment. This is such a helpful guide for those of us who are indoor plant lovers! Treating a plant for Fungus gnats can be frustrating, especially when they keep appearing around potted plants despite regular cleaning. I appreciate learning that managing excess moisture and treating the soil are important steps in controlling them. The practical tips here are a great reminder that healthy indoor plants start with proper care. Definitely worth reading for anyone struggling with these tiny pests! Thanks for sharing!
Once again you are welcome Izzyagrotech, it is a pleasure having reading my post again.
This is a very helpful and informative guide! I have noticed these tiny flies around my indoor plants before, and I never realized that simply catching the adult insects would not solve the problem because their eggs and larvae could still be hiding in the soil.
I particularly appreciate the advice on using yellow sticky traps, adjusting watering habits, and treating the larvae with Bti. The section explaining why apple cider vinegar traps are not very effective against fungus gnats was also quite enlightening. Thanks for sharing these practical solutions.
One question:
Can fungus gnats eventually disappear completely by simply allowing the top layer of soil to dry between waterings, or is a larval treatment usually necessary for a persistent infestation?
Happy Weekend Ghettochild, and thank you for stopping bb!
Yes, fungus gnats can eventually disappear by allowing the top 1–2 inches of soil to dry between waterings, provided the plant can tolerate this. Fungus gnat larvae thrive in moist soil, so reducing moisture makes the environment less suitable for their survival and reproduction.
However, drying the soil alone may not completely eliminate a persistent infestation. Some larvae may survive in deeper, moist areas of the potting mix.
For better results:
1. Allow the soil surface to dry: Let the top 1–2 inches dry before watering again.
2. Use yellow sticky traps: These catch adult fungus gnats and help reduce egg-laying.
3. Apply Bti treatment: Products containing Bacillus thuringiensis israelensis target fungus gnat larvae in the soil.
4. Improve drainage: Ensure pots have drainage holes and remove excess water from saucers.
My recommendation: For a mild infestation, adjusting watering habits and using sticky traps may be sufficient. For a persistent infestation, combine these methods with Bti treatment to target larvae directly and break the breeding cycle.