To get rid of gnats in indoor plants, let the top 1–2 inches of soil dry out between waterings, place yellow sticky traps near the soil surface to catch adults, and apply a Bti (Bacillus thuringiensis israelensis) soil drench to kill larvae. Most infestations clear in 3–4 weeks with consistent treatment of both the adult and larval stages together.
If you’ve ever had a tiny black bug fly into your face while watering a houseplant, you already know the problem. These are almost always fungus gnats, and they show up because of one thing more than any other: soil that stays wet too long. Killing the adults you see flying around solves nothing on its own — the eggs and larvae living in the soil keep the cycle going. This guide covers full identification, why they showed up, a real step-by-step treatment plan, and the specific situations (self-watering pots, propagation cuttings, herb plants) that most guides skip entirely.
What Are Fungus Gnats (and How to Tell Them Apart From Fruit Flies)
Fungus gnats are small flying insects that breed in damp potting soil and feed on decaying organic matter, fungi, and algae — not on fruit, unlike their most common look-alike. Confusing the two leads people to try the wrong fix, since fruit fly traps don’t work well against fungus gnats.
| Feature | Fungus Gnat | Fruit Fly | Drain Fly |
| Body | Slender, mosquito-like, long legs | Rounder, stockier body | Fuzzy, moth-like wings |
| Color | Grayish to black | Tan to black, red eyes | Grayish-tan |
| Where found | Around potted soil | Around ripe produce, drains, trash | Near sink/shower drains |
| Attracted to | Moist soil, organic matter | Fermenting fruit, sugar | Organic gunk in drains |
| Bites? | No | No | No |
If your gnats are hovering specifically around houseplants and soil (not your fruit bowl or sink), they’re almost certainly fungus gnats. This matters because vinegar traps the go-to fix for fruit flies, are inconsistent against fungus gnats, since fungus gnats aren’t strongly drawn to fermenting vinegar the way fruit flies are. Some sources still recommend a vinegar-and-dish-soap trap as a supplementary adult catcher, but sticky traps are the more reliable primary tool for fungus gnats specifically.
Why Fungus Gnats Showed Up in Your Plants
- Overwatering the single biggest cause; consistently moist soil is exactly what female gnats look for to lay eggs.
- New bagged potting soil and commercial potting mixes aren’t sterilized (doing so would kill beneficial organisms), so gnat eggs can enter during shipping or while bags sit on a store shelf with pinhole openings.
- A new plant brought into the house infested soil rides in with the plant itself.
- Repotting with contaminated soil using leftover soil from an already-infested pot spreads the problem to every plant it touches.
- Decaying organic matter in soil compost-heavy mixes, fallen leaves, or dead root material left in the pot feed the larvae directly.
Step-by-Step: How to Get Rid of Gnats in Indoor Plants
1. Let the soil dry out
Water only when the top 1–2 inches of soil are dry to the touch. This is the fastest way to make soil inhospitable for egg-laying, though it will not fix an infestation on its own — several readers who tried this alone reported gnats persisting for months without also treating larvae directly.
2. Set out yellow sticky traps
Place them on stakes near the soil surface in every affected pot. These catch adults and, just as usefully, tell you which pots are still active as the population declines.
3. Apply a Bti soil drench
Look for products labeled with Bacillus thuringiensis subsp. israelensis (often sold as “mosquito bits” or “mosquito dunks”). Steep the recommended amount in water for 30 minutes to a few hours, strain, then water your plants with the solution as you normally would. Bti targets larvae specifically and is safe for edible plants, including herbs, when used as directed.
4. Repeat weekly
Bti only kills larvae present in the soil at the time of application, not eggs. Reapply every 5–7 days for 3–4 weeks to catch newly hatched larvae as the cycle continues.
5. Top-dress with sand or gravel (optional)
A ¼–1-inch layer of coarse horticultural sand or fine gravel on the soil surface dries faster than bare soil, making it a poor egg-laying site. Don’t use play sand, which compacts differently and doesn’t drain the same way.
6. Monitor with a potato slice test
Press a raw potato slice cut-side down onto the soil surface. Fungus gnat larvae are drawn to it and will surface to feed within 3–4 days — check, remove, and replace until you no longer find any.
7. Water from the bottom when possible
Set the pot in a shallow tray of water and let it wick up through the drainage hole. This hydrates roots while keeping the soil surface dry, which discourages egg-laying at the surface.
What Doesn’t Work (Save Yourself the Trouble)
- Letting soil dry out alone, without also treating larvae, reduces new egg-laying but does nothing for larvae already in the soil; infestations regularly outlast this method by itself.
- Hydrogen peroxide soil drench is commonly recommended online, but results are inconsistent, and it can harm beneficial soil organisms along with any gnat larvae it reaches.
- Diatomaceous earth is often the most expensive option tried, with mixed results reported once soil is already infested, since it works mainly as a surface barrier rather than reaching larvae in the soil.
- Vinegar traps alone are effective for fruit flies, but unreliable as a sole method for fungus gnats.
- Treating adults only with sticky traps reduces the visible nuisance but do nothing to stop new adults from emerging if larvae are still active in the soil.
Special Situations Most Guides Skip
Self-watering pots
If your pot wicks water from a reservoir, the soil often stays consistently damp near the wick even though the surface looks dry a favorite spot for gnats. Water from the top occasionally instead of relying solely on the reservoir, and add a sticky trap inside the pot itself.
Read more: Herb Planter: The Complete Guide to Choosing, Building, and Growing One (Indoors or Out)
Propagating cuttings
Cuttings need consistently moist soil to root, which conflicts directly with the “let it dry out” advice. In this case, skip the drying step and instead use a Bti soil drench from the start; it won’t harm the cutting and keeps larvae in check while moisture stays high.
Herb and edible plants
Bti-based products are labeled safe for use on food crops, including culinary herbs, when applied according to package directions. This makes it the preferred method over broad-spectrum insecticides for anyone growing herbs indoors.
Newly repotted plants that develop gnats weeks later
This usually means the new soil itself was already carrying eggs; bagged potting mixes aren’t sterilized, and eggs can survive in dry soil for a period before hatching once watered. If this happens, treat immediately with Bti rather than assuming the plant is the source.
Treatment Method Comparison
| Method | Targets | Speed | Chemical-Free | Notes |
| Sticky traps | Adults only | Immediate, ongoing | Yes | Best paired with a larvae treatment, not used alone |
| Bti soil drench | Larvae | 3–4 weeks with weekly use | Yes (biological) | Most reliable core method; safe for edible plants |
| Letting soil dry out | Prevents new eggs | Ongoing | Yes | Necessary habit, not a standalone fix |
| Sand/gravel top layer | Prevents egg-laying at surface | Ongoing | Yes | Helpful add-on, not a fix by itself |
| Beneficial nematodes | Larvae | 2–3 weeks | Yes (biological) | Effective per user reports; higher cost, shipping-dependent |
| Chemical insecticide (pyrethrin-based) | Adults | Fast, temporary | No | Reserve for severe infestations; always pair with non-chemical larvae control |
Pros and Cons of the Main Control Methods
Bti-based treatment
- Pros: Targets the actual source (larvae), safe for edible plants, widely available
- Cons: Takes several weeks of repeat applications; doesn’t kill eggs directly
Sticky traps
- Pros: Cheap, immediate, doubles as a monitoring tool
- Cons: Does nothing for the larvae still breeding in soil
Letting soil dry out
- Pros: Free, addresses the root cause of attraction
- Cons: Not compatible with plants that need consistent moisture; slow on its own
Key Takeaways
- Fungus gnats breed in consistently moist soil; drying out the top layer between waterings is necessary but not sufficient on its own.
- Treat adults and larvae together: sticky traps for adults, a Bti soil drench for larvae, repeated weekly for 3–4 weeks.
- Vinegar traps work well for fruit flies but are an unreliable primary method for fungus gnats specifically, use sticky traps instead.
- Bti is safe for edible plants, including herbs, making it the preferred treatment over broad insecticides for a kitchen herb garden.
- New potting soil, new plants, and reused infested soil are the most common sources of a fresh infestation.
FAQs
How do I know if I have fungus gnats or fruit flies?
Fungus gnats are slender and mosquito-like and hover around potted soil, while fruit flies are rounder-bodied with red eyes and gather around ripe produce or drains rather than plant soil.
Is it safe to use gnat treatments on indoor herb plants?
Yes, Bti-based products (often sold as mosquito bits or dunks) are labeled safe for food crops, including culinary herbs, when used according to the package directions, making them the preferred option over broad-spectrum insecticides.
How long does it take to get rid of fungus gnats?
Most infestations clear in 3–4 weeks with consistent weekly treatment of both adults (sticky traps) and larvae (Bti soil drench); treating only one stage typically extends the timeline or fails to resolve it.
Do vinegar traps work on fungus gnats?
Not reliably. Vinegar traps are effective against fruit flies, but fungus gnats aren’t strongly attracted to fermenting vinegar, so sticky traps are the more dependable choice for catching adults.
Can fungus gnats come from a brand-new bag of potting soil?
Yes, commercial potting mixes aren’t sterilized before packaging, so eggs can be introduced during shipping or while bags sit on store shelves, even if the bag looks sealed.





