If you're seeing tiny black flies hovering around your plant soil, you have fungus gnats. They breed in the top inch of wet potting mix, and a single female can lay up to 200 eggs in a seven to ten-day lifespan per Colorado State University Extension. The full egg-to-adult cycle is three to four weeks at room temperature per UC IPM, which is why by the time you notice the adults you already have overlapping generations developing in the soil. Most online advice sells you on solutions that don't address the larvae, which is where the damage actually happens.
Fungus gnats are tiny (2 mm) dark flies that breed in moist potting soil and whose larvae feed on plant roots. The adults you see flying are annoying but harmless; the larvae cause real damage to seedlings and young plants. Treatment requires drying out the top inch of soil between waterings and applying Bacillus thuringiensis israelensis (BTi, sold as Mosquito Bits) to the soil surface to kill larvae.
The treatment ladder
Start at step 1. If you don't see results in the timeframe, move to step 2. Most apartment infestations clear at step 2 or 3. Step 5 is for repeat offenders.
Stop watering. Let the top 2" dry completely.
Mosquito Bits — the actual fix.
Active ingredient: Bacillus thuringiensis israelensis (BTi). [Per the EPA](https://www.epa.gov/mosquitocontrol/bti-mosquito-control), BTi produces toxins that specifically affect the larvae of mosquitoes, black flies, and fungus gnats — and has no toxicity to people. Sprinkle a thin layer on top of your soil, water through it. The bacteria release into the wet soil and kill larvae within 24–48 hours. Reapply every 7 days for 3 weeks to cover the full 3–4 week egg-to-adult cycle.
I use Summit Mosquito Bits (30oz). ~$15 on Amazon, one bag lasts years. This single product clears most apartment fungus gnat problems on its own.
Yellow sticky traps — for monitoring, not killing.
Stick them in the soil near your plants. They catch adult gnats and let you watch the population drop over the 3-week BTi treatment. Don't use these instead of Mosquito Bits — [yellow sticky traps catch adults only](https://ipm.ucanr.edu/home-and-landscape/fungus-gnats/) per UC IPM, and a single missed female lays up to 200 more eggs. Use them with the BTi treatment so you can see your progress.
I use Garsum yellow sticky traps (42-pack). Replace when half-covered.
Sand or grit top-dressing as prevention.
Hydrogen peroxide soil drench (only if BTi failed).
1 part 3% hydrogen peroxide to 4 parts water. Drench the soil thoroughly. The peroxide foams as it kills larvae and oxygenates the root zone. It's harder on the plant than BTi, but it works fast on bad infestations. Use once, not weekly — peroxide alters the soil microbiome with repeated use.
This is also the right move if you suspect root rot has started. See the root rot guide for the full unpot-and-repot protocol.
What doesn't work (and what I wasted time on)
My first three days of fighting gnats, I tried all of these. None of them ended the infestation.
| Method | What it does | Why it doesn't end an infestation |
|---|---|---|
| Yellow sticky traps alone | Catches adult gnats | Doesn't touch the larvae. The eggs already laid will hatch and continue the cycle. |
| Apple cider vinegar traps | Drowns some adult gnats | Same problem as sticky traps. Catches a fraction of the adult population. Larvae untouched. |
| Cinnamon sprinkled on soil | Mild fungicide | Folk remedy. Doesn't kill gnat larvae. May reduce fungal food source slightly. |
| Dish soap drench | Suffocates some larvae | Inconsistent results. Can damage roots at high concentrations. BTi is safer and more effective. |
| Repotting in fresh soil | Removes current larvae | Adults will lay eggs in the new soil within hours. Doesn't break the cycle without BTi or top-dressing. |
| Letting soil dry out completely | Kills larvae in the dry layer | Reduces population but stresses the plant. Works best as part of treatment, not alone. |
Prevention checklist (after you've cleared an infestation)
- Bottom-water your plants when possible. Sit the pot in water for 20 minutes and let the soil wick up. Top of the soil stays dry — gnats have nowhere to lay eggs.
- Top-dress with sand or grit on every pot. 1/2 inch is enough. This is the single best prevention measure.
- Quarantine new plants for 2 weeks. Most apartment infestations start from a new plant. Yellow sticky trap nearby + visual check before integrating.
- Don't reuse old potting mix. If you repot, throw the old soil — even if it looks fine, it can carry eggs.
- Address overwatering at the source. Chronic moist soil is the root condition.
- Keep BTi on hand. One bag of Mosquito Bits lasts years. Sprinkle preventively after a heavy water if you've had gnats before.