Fungus gnats are tiny dark flies that often appear around houseplants, windows, and moist potting soil. While the adult gnats are mostly a nuisance, their larvae live in damp soil and feed on fungi, decaying organic matter, and sometimes tender plant roots. The best way to get rid of fungus gnats is to target both adults and larvae while correcting the damp conditions that allow them to reproduce. Here are the most effective methods for eliminating fungus gnats from plants, soil, and your home.
How to Get Rid of Fungus Gnats Fast
The fastest approach combines several methods rather than relying on one treatment.
Start by allowing the upper layer of potting soil to dry between waterings. Add yellow sticky traps near affected plants to catch adult gnats. At the same time, treat larvae in the soil with an appropriate biological control such as Bacillus thuringiensis israelensis (Bti).
This attacks multiple stages of the fungus gnat life cycle.
For severe infestations:
- Reduce watering
- Remove dead plant material
- Use yellow sticky traps
- Treat larvae in the soil
- Check nearby plants
- Repeat treatments as necessary
Because eggs and larvae remain in the soil after adult gnats disappear, complete control usually takes more than a few days.
1. Let the Soil Dry Between Waterings
Overwatered potting soil is one of the biggest reasons fungus gnats become established.
Their larvae prefer consistently moist soil containing fungi and decomposing organic material. Allowing the top 1–2 inches of soil to become reasonably dry makes the environment less favorable for egg laying and larval development.
Check soil moisture before watering instead of following a strict schedule.
Plants have different watering requirements, however, so don’t allow moisture-loving species to become severely dehydrated just to control gnats.
Bottom watering may also help keep the surface comparatively dry while still providing moisture to plant roots.
2. Use Yellow Sticky Traps

Yellow sticky traps are one of the easiest ways to control adult fungus gnats.
Place the traps close to the soil surface where adults are most active. The bright yellow color attracts gnats, which become stuck to the adhesive.
Sticky traps help by:
- Reducing breeding adults
- Showing which plants are infested
- Monitoring whether treatment is working
However, traps alone rarely eliminate an infestation because they do not kill eggs or larvae living below the soil surface.
Combine them with soil treatment for better results.
3. Treat the Soil With Bti
Bacillus thuringiensis israelensis, commonly called Bti, is a biological control used against certain fly and mosquito larvae.
When properly applied to affected potting soil according to product directions, Bti can kill fungus gnat larvae while having relatively little effect on plants and many other organisms.
Multiple applications may be necessary because new larvae can continue emerging from eggs already present in the soil.
Bti works particularly well when combined with sticky traps: the Bti targets larvae while traps catch adults.
4. Use Beneficial Nematodes

Beneficial nematodes can provide another biological way to control fungus gnats.
The species Steinernema feltiae is commonly used against fungus gnat larvae. These microscopic organisms move through moist soil and parasitize susceptible larvae.
They can be particularly useful for:
- Large houseplant collections
- Greenhouses
- Seedling areas
- Indoor gardens
Follow storage, temperature, mixing, and application instructions carefully because beneficial nematodes are living organisms.
5. Remove Decaying Organic Material

Fungus gnat larvae thrive where moisture, fungi, and decomposing plant material are abundant.
Remove:
- Fallen leaves
- Dead flowers
- Rotting roots
- Plant debris
- Moldy organic matter
Do not allow dead vegetation to accumulate on top of potting soil.
Also check drainage trays and decorative outer pots. Water that constantly collects beneath containers can create moist conditions that encourage fungus gnats and root problems.
6. Repot Heavily Infested Plants
If a plant has a severe infestation that repeatedly returns, replacing the potting medium may help.
Carefully remove the plant from its container and discard heavily contaminated soil. Check the roots and trim dead or rotting material when appropriate for the plant.
Repot using fresh, clean, well-draining potting mix in a container with adequate drainage holes.
Repotting should not automatically be the first treatment because it can stress plants. It is more appropriate when soil is badly degraded, remains constantly wet, or has drainage problems.
7. Try Diatomaceous Earth Carefully
Food-grade diatomaceous earth is sometimes used as part of fungus gnat management.
A thin layer applied to a dry soil surface may damage small insects that crawl through it. However, diatomaceous earth becomes much less effective when wet.
Because plant soil is repeatedly watered, it can be difficult to maintain the dry conditions needed for this method to work consistently.
Avoid breathing airborne diatomaceous earth dust and follow the product label carefully.
It is generally better used as an additional measure rather than the only fungus gnat treatment.
8. Use Hydrogen Peroxide With Caution
A diluted hydrogen peroxide soil treatment is a popular home remedy for fungus gnats, but it should be used cautiously.
Concentrated hydrogen peroxide can damage roots and beneficial soil organisms. Different plant species also vary in sensitivity.
For that reason, biological controls such as Bti are generally more predictable options for routine fungus gnat management.
If using any hydrogen peroxide treatment, avoid strong concentrations, follow reputable horticultural guidance, and test cautiously on sensitive plants.
Repeatedly soaking plants with peroxide is not necessary for successful fungus gnat control.
9. Remove Adult Gnats Around the House

Adult fungus gnats frequently leave plant containers and appear around windows, desks, kitchens, and bathrooms.
Vacuuming visible adults can quickly reduce their numbers. Sticky traps near infested plants can capture others before they reproduce.
If tiny flies seem concentrated around drains rather than plants, confirm their identity.
Drain flies are often confused with fungus gnats. Drain flies typically reproduce in organic buildup inside drains, while fungus gnats are more strongly associated with damp soil, potting mix, and decaying plant material.
Finding the breeding source is essential for permanent control.
10. Prevent Fungus Gnats From Coming Back
Getting rid of existing gnats is only part of the solution.
To prevent another infestation:
- Avoid routinely overwatering plants
- Use containers with drainage holes
- Empty standing water from saucers
- Remove dead leaves promptly
- Store unused potting soil properly
- Inspect new plants before bringing them indoors
- Quarantine suspicious plants temporarily
- Use clean, well-draining potting mixes
Monitoring with a few yellow sticky traps can also help detect new infestations before populations become large.
How to Get Rid of Fungus Gnats in Houseplants
For houseplants, a simple combination is often most effective.
First, reduce unnecessary watering and let the upper soil surface dry appropriately. Place sticky traps beside the affected pots. Then use a larval treatment such as Bti according to its directions.
Treat nearby plants as well if adults are moving throughout the room.
Do not focus only on killing flying gnats. A single female can lay many eggs, so larvae developing in the soil must also be controlled.
How to Get Rid of Fungus Gnats Naturally
Several non-synthetic approaches can help manage fungus gnats.
Drying the soil surface appropriately is the simplest. Yellow sticky traps physically capture adults, while beneficial nematodes and Bti provide biological control of larvae.
Good sanitation is equally important.
Remove decaying plant material and improve drainage so the potting medium does not remain saturated for long periods.
Home remedies such as cinnamon are frequently recommended online, but evidence that sprinkling cinnamon alone will eliminate a fungus gnat infestation is limited. It should not replace proven moisture management and larval control.
How Long Does It Take to Get Rid of Fungus Gnats?
A noticeable reduction in adult gnats may occur within several days after treatment, but eliminating an infestation often requires several weeks.
This happens because different life stages are present simultaneously:
- Eggs remain in the soil.
- Larvae continue developing.
- Pupae eventually produce new adults.
- Remaining adults may lay additional eggs.
Continue treatment even when you stop seeing large numbers of flying gnats.
Sticky traps are useful for monitoring progress. When traps remain mostly empty and no gnats emerge when you disturb the soil, the infestation is likely under control.
Fungus Gnats vs Fruit Flies
Fungus gnats and fruit flies are commonly confused.
Fungus gnats are usually slender, dark-colored insects with relatively long legs and antennae. They are frequently seen walking or flying around plant soil.
Fruit flies tend to have shorter, rounder bodies and are more strongly attracted to fermenting fruit, food waste, and sugary residues.
If flies are concentrated around houseplants, fungus gnats are more likely. If they gather around overripe fruit or garbage, fruit flies may be responsible.
FAQs
What kills fungus gnats instantly?
Sticky traps can immediately capture adult fungus gnats, while vacuuming can remove visible adults. However, eliminating an infestation requires treating larvae in the soil as well.
How do I permanently get rid of fungus gnats?
Control adults and larvae simultaneously, avoid overwatering, improve drainage, remove decaying organic material, and inspect new plants before bringing them indoors.
Why do I suddenly have fungus gnats in my house?
They often arrive in potting soil or newly purchased plants and multiply when soil remains consistently damp. Adult gnats can then spread to other plants.
Does dish soap get rid of fungus gnats?
Soap traps may catch some adult gnats but generally do not solve the underlying infestation because eggs and larvae remain in potting soil.
Can fungus gnats damage plants?
Adult fungus gnats generally cause little direct damage. Large numbers of larvae can feed on delicate roots and may be particularly troublesome for seedlings, cuttings, and young plants.
