How to Get Rid of Fungus Gnats in a Bioactive Terrarium

Fungus gnats show up when a bioactive terrarium stays too wet on the surface and nothing is competing for the same rotting material the larvae feed on, and every real fix here is pet-safe: starve them out, trap the adults, and let a springtail and isopod crew out-compete the larvae for food. Reach for a fogger or a bug spray instead and you risk the reptile, amphibian, or invertebrate living in that same enclosure, so nothing on this list is chemical. Seed a springtail culture into the substrate, let the top layer dry back between mistings, and add sticky traps for the adults already flying around, and most gnat blooms collapse within one to two weeks.
Larvae breed in wet, rotting material on top of the substrate
Unsafe around reptiles, amphibians and inverts sharing the tank
Springtails and isopods, less surface moisture, sticky traps for adults
Why fungus gnats show up in a bioactive tank
Fungus gnat larvae live and feed in the top layer of wet, decaying organic material, oversaturated substrate, soggy leaf litter, or spilled feeder-insect food that never gets cleaned up. The adults buzzing around are mostly a nuisance rather than a threat on their own, but a breeding population is a real sign the substrate surface is staying wetter and richer than it should.
This shows up constantly in new or heavily planted bioactive builds, and it does not mean anything is wrong with the animal in the tank. It is extremely common alongside a fresh mold bloom too, since both are driven by the same excess surface moisture in a newly built enclosure; our new terrarium mold guide covers that companion issue.

The pet-safe list: what actually works
Four levers actually move the needle here, and none of them involve chemicals. Biological competition from springtails and isopods already eating the same rotting material the larvae need, letting the top half-inch of substrate dry back between mistings, watering in Bti to target the larvae specifically, and yellow sticky traps to catch the adults and break the breeding cycle before they lay another round of eggs.
Use more than one of these at once rather than picking a single fix. A tank that is still too wet will keep producing gnats no matter how many traps you hang, and a crew with no established competition will lose ground even if the surface dries out. If you do not have isopods established yet, our isopod care guide covers setup and feeding for the easiest species to start with.
Why springtails and isopods are the first move, not a last resort
A springtail and isopod population that is already established in the substrate is already eating the fungal film and rotting litter that gnat larvae depend on, which leaves very little food behind for a gnat population to take hold in the first place. It is the same mechanism we cover in our piece on why springtails eat mold, just aimed at a different pest competing for the same resource.
This is why seeding a crew early, before gnats ever show up, works better than reaching for one after a bloom is already underway. A tank with an established, hungry cleanup crew is simply a harder place for gnat larvae to compete and survive, regardless of what else you do.
Bti: the one biological you can water in
Bti, short for Bacillus thuringiensis israelensis, is a naturally occurring bacterium sold as mosquito dunks or mosquito bits, and it targets fly larvae specifically, gnats and mosquitoes, rather than acting as a broad pesticide. It is widely used in the reptile and plant-keeping hobby, watered into the substrate at label rate, without harming reptiles, amphibians, isopods, springtails, or live plants.
That said, treat this as general hobby practice rather than a guarantee, always use a product actually labeled for this purpose and follow the label rate. Bti only affects larvae in the substrate, not the adults already flying around, so pair it with sticky traps to deal with the gnats that are already out and breeding.
Dry the surface back without stressing the animal
Most gnat problems trace back to misting on a fixed schedule instead of misting based on what the substrate actually needs. Let the top layer dry to the touch between waterings while keeping a damp hide zone or water dish for any animal that needs consistent humidity, and improve airflow, crack the lid slightly or add more mesh, so the surface can actually dry instead of staying damp under a sealed lid.
This is a balance, not a directive to dry the whole enclosure out. The goal is a drier surface layer specifically while the deeper substrate and any humid hide stay damp underneath. If you are still working out your setup's moisture routine, our guide on how long a bioactive tank needs to establish covers the early settling-in period this usually happens during.

What not to use
Skip bug bombs, foggers, aerosol sprays, and over-the-counter pesticides entirely in or near an enclosure housing a reptile, amphibian, or invertebrate. These products are not labeled for that use, and they can harm the animal, the cleanup crew, and any live plants all at once. Even a lot of natural, essential-oil-based sprays are genuinely toxic to isopods and springtails, so 'natural' is not the same as 'safe' here.
The safe stack, competition from an established crew, drying the surface back, Bti in the substrate, and sticky traps for adults, is virtually always enough given a week or two. A bloom that will not quit despite all four usually means the substrate is staying wetter than it should from a drainage or watering-habit issue that is worth fixing directly at the source.
The Pet-Safe Gnat-Control Crew
The cleanup crew and substrate that starve out fungus gnat larvae. Add what you need, then send it all to your cart in one tap.
Frequently Asked Questions
Written by the TC INSECTS breeding team · Porter, Texas · Live Arrival Guarantee on every order
Have a care question? Ask our community.
Join Reptile Keepers USA, our free Facebook group for reptile, amphibian and invert keepers. Share your setups, get care help and swap feeder tips.
Join the free group
