Fungus gnats in indoor herb plants can be frustrating. You water your basil, mint, parsley, or cilantro, and suddenly tiny black flies start hovering around the pots, landing on the soil, and drifting across your kitchen.
The good news is that you usually don’t need to throw away your herbs or spray your entire indoor garden. The most effective way to get rid of fungus gnats is to reduce excess moisture, trap adult flies, and treat the larvae living in the potting mix when necessary.
Yellow sticky traps help catch adult gnats, while products containing Bacillus thuringiensis subsp. israelensis (Bti), when labeled for the intended use, can target larvae in the growing medium. Adjusting your watering routine helps prevent another generation from developing. Using these methods together is generally more effective than relying on a single remedy.
This guide explains seven practical solutions, how to use them around indoor herbs, how long treatment may take, and how to stop fungus gnats from returning.
Quick Answer: How Do You Get Rid of Fungus Gnats in Indoor Herb Plants?
To get rid of fungus gnats in indoor herb plants:
- Let the upper layer of potting mix dry between waterings, as the herb allows.
- Place yellow sticky traps near affected pots to catch adult gnats.
- Use a suitable Bti treatment according to its label if larvae are present.
- Empty saucers and remove dead leaves and decaying plant material.
- Improve drainage if the potting mix stays wet for too long.
- Check nearby pots to identify other sources of infestation.
- Continue monitoring and treatment long enough to interrupt the life cycle.
The most important principle is to target both the flying adults and the larvae in the soil. Traps alone may reduce the number of visible flies, but they won’t reliably eliminate larvae already developing in the potting mix.
What Are Fungus Gnats, and Why Are They in Your Herb Pots?
Fungus gnats are tiny, dark-colored flies that commonly breed in moist potting mix containing organic matter. Adults often resemble miniature mosquitoes, but they are usually weak fliers and tend to stay close to plants, soil, windows, and other light sources.
The larvae live in the growing medium, where they feed mainly on fungi and decaying organic matter. Some can also feed on delicate roots, making infestations more concerning in seedlings, cuttings, and young plants.
Mature indoor herbs can often tolerate a small population, but persistent infestations are irritating and may affect plant health when root damage occurs.
Why fungus gnats appear in indoor herb gardens
Several conditions can encourage fungus gnats:
- Overwatering: Soil that remains consistently wet creates favorable conditions for eggs and larvae.
- Poor drainage: Pots without drainage holes or dense potting mixes can retain excess water.
- Decaying material: Dead leaves and other organic debris provide food for developing larvae.
- Infested new plants: A newly purchased herb can introduce gnats to your other pots.
- Old, compacted potting mix: A growing medium that has broken down may retain more moisture than it used to.
- Standing water: Water left in saucers or trays can contribute to poor growing conditions, although gnats breeding in drains or other damp organic debris may have a separate source.
Overwatering is a common contributor, but it isn’t the only possible cause. If gnats keep appearing despite changes to your watering routine, inspect neighboring plants and nearby damp areas too.
How to Tell Fungus Gnats Apart From Fruit Flies
Before treating your herbs, make sure you’re dealing with fungus gnats rather than another small flying insect.
| Feature | Fungus gnats | Fruit flies |
| Appearance | Tiny, dark, mosquito-like flies | Often tan or brown, sometimes with reddish eyes |
| Where they gather | Around potting mix and plant pots | Near ripe fruit, food waste, and fermenting liquids |
| Larvae develop in | Moist growing medium and organic matter | Fermenting fruit and other suitable decaying food |
| Common indoor clue | Flies emerging from herb pots | Flies clustering around fruit bowls or bins |
| Best first step | Inspect soil moisture and use sticky traps | Remove the food or fermenting material attracting them |
If the flies consistently emerge from your herb pots, fungus gnats are a likely explanation. If they cluster around your fruit bowl, sink, or trash bin, investigate those areas as well.
7 Effective Ways to Get Rid of Fungus Gnats in Indoor Herb Plants

1. Let the Top Layer of Soil Dry Between Waterings
Start here if your herb pots are constantly damp. Fungus gnats prefer moist growing media because it provides favorable conditions for egg laying and larval development.
Allowing the surface of the potting mix to dry reduces its suitability for fungus gnats. It also helps correct one of the most common conditions associated with recurring infestations.
Here’s how to do it:
- Check the soil with your finger before watering.
- If the upper layer is still wet, wait before watering again when the herb can tolerate it.
- Empty any water remaining in the saucer.
- Check the soil again before the next watering rather than following a rigid daily schedule.
- Continue monitoring the plant and the soil surface.
The amount of drying you can safely allow depends on the herb. Rosemary, thyme, and oregano generally tolerate more drying between waterings than basil, mint, parsley, or cilantro.
Don’t let your herbs wilt just to kill gnats. The aim is to reduce excess moisture without dehydrating the plant.
If the soil remains wet for days after watering, the problem may involve more than watering frequency. Your pot could be too large, the mix too dense, or the drainage inadequate. See our guide to the best soil for herbs for more help choosing a suitable growing medium.
2. Use Yellow Sticky Traps to Catch Adult Fungus Gnats
Yellow sticky traps are among the simplest ways to catch adult fungus gnats and monitor an infestation.
The bright yellow surface attracts many small flying insects, which become stuck when they land on it.
To use them effectively:
- Place a trap near the soil surface of an affected pot.
- Position it where it can catch gnats moving around the plant.
- Check the trap regularly to see whether the number of adults is declining.
- Replace it when it becomes covered with insects, dusty, or otherwise ineffective.
For several infested pots, use traps near the affected plants rather than relying on one trap at the other end of the room.
What sticky traps can and cannot do: They catch adults, including some females before they lay more eggs. However, they don’t directly eliminate larvae developing in the soil.
Think of them as one part of a control plan, not the entire solution.
3. Treat Fungus Gnat Larvae With Bti
If you continue seeing adult gnats, particularly when the soil is moist, larvae may still be developing in the potting mix.
Bti stands for Bacillus thuringiensis subsp. israelensis, a bacterium used in certain biological pest-control products. Appropriate Bti formulations can target fungus gnat larvae in growing media.
For indoor herbs, choose a product whose label specifically permits the intended use. Check that the instructions cover your type of plant, growing situation, and application method.
Follow the label for:
- Mixing and application rates
- Whether the product can be used on edible herbs
- Application frequency
- Harvest intervals or other precautions, if specified
- Storage and handling
Bti targets susceptible larvae; it does not simply make all adult flies disappear. Depending on the product and the infestation, repeat applications may be necessary.
Don’t assume every product containing Bti is approved for every plant or use. If you cannot confirm that a product is suitable for edible herbs, choose another approach or consult a local gardening professional.
4. Adjust How You Water Your Indoor Herbs
Changing your watering routine helps address the conditions that allow fungus gnats to return.
Many gardeners water indoor herbs on a fixed schedule, even when the soil is still damp. This can be especially problematic in winter or in rooms with low light, when plants may use water more slowly.
Instead, check each pot before watering.
Try these adjustments:
- Water when the plant and soil actually need it, not simply because another day has passed.
- Water thoroughly when needed, then let excess water drain away.
- Empty saucers rather than allowing pots to sit in standing water.
- Make sure every pot has suitable drainage holes.
- Avoid keeping the entire root zone continuously saturated.
Bottom watering can help keep the surface of the soil drier. Place the pot in water briefly so moisture moves upward through the drainage holes, then remove it and allow excess water to drain. Don’t leave the pot sitting in water indefinitely.
Bottom watering is not a cure by itself. The deeper growing medium can remain too wet, so continue checking moisture and adjust your routine to the herb’s needs.
If you suspect excess moisture is the main issue, read our related guide, How to Fix Overwatered Indoor Herbs, for more detailed troubleshooting.
5. Remove Dead Leaves and Decaying Plant Material
Fungus gnat larvae feed mainly on fungi and decaying organic matter, so keeping pots clean helps reduce favorable breeding conditions.
Make a habit of removing:
- Dead leaves lying on the soil
- Rotting stems
- Fallen flowers
- Decaying roots or other plant debris
- Organic material that has collected in saucers
Also clean the area around your herb garden. Check trays, decorative outer pots, and the surfaces underneath containers for trapped water or decaying material.
This step is simple, but it supports the more important measures of moisture management and larval control.
You don’t need to remove all organic matter from the growing medium or sterilize your entire home. Focus on decaying debris and persistently damp areas.
6. Improve Drainage or Repot Severely Affected Herbs
Sometimes, the growing medium itself is contributing to the problem.
If your potting mix remains wet long after watering, feels dense and compacted, or has developed an unpleasant smell, check the container and roots.
Consider repotting when:
- The container has no drainage holes.
- The soil has broken down and stays saturated.
- The plant has signs of root damage.
- The growing medium is severely compacted.
- The infestation persists despite correcting watering and using appropriate controls.
If repotting is necessary, use fresh, suitable potting mix and a clean container with drainage holes. Remove loose, degraded soil carefully without damaging healthy roots.
Don’t automatically repot every affected herb. Repotting can stress plants, and it may not be necessary if the soil drains properly and the infestation responds to other measures.
For help choosing a container, see our guide to the best pots for indoor herbs. Choose a pot appropriate for the plant’s root system rather than a container that’s much larger than necessary.
7. Check Every Nearby Pot and Prevent Reinfestation
Treating one plant won’t solve the problem if other pots are still producing adult gnats.
Inspect all your indoor herbs, especially those kept close together. Look for adult flies near the soil, consistently wet growing media, dead leaves, and other signs of an infestation.
Then:
- Place sticky traps near suspicious pots.
- Check soil moisture in every container.
- Treat confirmed infestations using appropriate methods.
- Inspect new plants before placing them beside established herbs.
- Keep monitoring after the number of visible gnats declines.
If the flies don’t seem to be coming from your plants, check nearby drains and other damp areas containing organic debris. The source may be somewhere other than your herb garden.
The key is consistency. Removing the visible adults without addressing the breeding source can allow another wave of flies to appear.
How Long Does It Take to Get Rid of Fungus Gnats?
You may notice fewer adult gnats within the first several days of using traps and correcting watering, but a complete reduction in an established infestation can take several weeks.
Fungus gnats develop through egg, larval, pupal, and adult stages. Some stages remain in the growing medium, so killing or trapping the adults you can see doesn’t mean the infestation has ended.
A practical timeline looks like this:
| Period | What you may notice | What to do |
| First few days | Sticky traps begin catching adults | Correct excess moisture and inspect nearby pots |
| First 1–2 weeks | Adult numbers may start declining | Continue monitoring and use suitable larval controls as directed |
| Following weeks | Fewer new adults should emerge if breeding is interrupted | Keep traps in place and maintain appropriate watering |
| If gnats persist | Another pot or breeding source may remain | Recheck soil, drainage, neighboring plants, and damp areas |
These are general expectations, not guaranteed deadlines. Temperature, soil moisture, the size of the infestation, and the treatment used can all affect how quickly the population declines.
Don’t stop monitoring just because the room looks clear for a day or two.
What Doesn’t Work Well on Its Own?
Some popular remedies may appear to help but fail to address every stage of the fungus gnat life cycle.
Yellow sticky traps alone
They catch adult flies but don’t kill larvae already in the soil. Use them alongside moisture management and appropriate larval control when necessary.
Watering less without checking the plant
Drying the soil surface helps, but excessive drought can damage herbs. Different species have different moisture requirements.
Spraying the air to kill flying gnats
Spraying adult flies doesn’t address the larvae developing in the potting mix. Insecticide use indoors should be limited to products labeled for the intended pest and situation.
Repeatedly adding household remedies
Hydrogen peroxide, dish soap, essential oils, and other home remedies are frequently recommended online, but effectiveness and plant safety can vary. Concentrated or incorrectly mixed products can injure plants, and some treatments are unsuitable for edible herbs.
Rather than experimenting with increasingly strong mixtures, start with moisture management and traps. If larvae remain a problem, choose an appropriate, labeled treatment.
How to Prevent Fungus Gnats From Returning
Once the infestation is under control, focus on keeping the growing conditions less favorable for another one.
Choose suitable potting mix
Use a container mix that drains well while retaining enough moisture for the herb. A mix that remains soggy can make fungus gnat problems more likely.
Match watering to the herb
Mint and basil generally need more consistent moisture than rosemary and thyme. Don’t use the same watering schedule for every pot.
Use pots with drainage holes
Drainage allows excess water to escape and makes moisture management easier. Avoid letting containers sit in standing water.
Inspect new plants
Check new herbs for adult gnats before introducing them to your existing collection. Monitor them after bringing them home.
Remove plant debris
Clean up dead leaves and decaying material before they accumulate around your pots.
Recheck conditions as seasons change
Indoor herbs may use less water when growth slows or daylight decreases. Adjust your routine instead of maintaining the same watering frequency year-round.
Prevention doesn’t require keeping every pot bone-dry. It means maintaining the moisture level each herb needs without leaving the growing medium unnecessarily wet.
Frequently Asked Questions
What kills fungus gnats but doesn’t harm indoor herbs?
The safest approach depends on the herb and the treatment. Allowing the soil surface to dry between waterings, using yellow sticky traps, and applying a Bti product specifically labeled for the intended use are common control methods. Follow all label directions, particularly for edible herbs.
Does hydrogen peroxide kill fungus gnats immediately?
Hydrogen peroxide is often promoted as a quick fungus gnat remedy, but it shouldn’t be treated as a guaranteed solution. Results and plant safety depend on concentration and application. It also doesn’t replace correcting persistently wet soil or monitoring the life cycle.
Why do I still have fungus gnats after using sticky traps?
Sticky traps catch adult gnats, but eggs, larvae, and pupae may remain in the growing medium. Continue managing soil moisture, inspect other pots, and consider a suitable larval treatment if necessary.
How long does it take to completely get rid of fungus gnats?
An established infestation can take several weeks to control because immature stages may continue developing in the soil after adult flies have been trapped. Keep monitoring and follow the treatment instructions until new adults stop appearing.
Can fungus gnats kill my indoor herbs?
A small number of adult fungus gnats usually cause little direct harm. However, larvae can damage delicate roots, particularly in seedlings and young plants, and severe infestations may contribute to poor growth. Persistent infestations are worth addressing promptly.
Final Takeaway
The most effective way to get rid of fungus gnats in indoor herb plants is to treat the breeding source, not just the flying insects.
Start by correcting excess moisture, placing yellow sticky traps near affected pots, removing decaying debris, and checking the drainage. If larvae continue to develop, consider an appropriately labeled Bti treatment or another suitable control method.
Give the process time. Continue monitoring for several weeks, inspect neighboring pots, and adjust watering to suit each herb.
With the right combination of moisture management, adult trapping, and targeted larval control, you can usually bring fungus gnats under control without sacrificing your indoor herb garden.




