Fungus gnats are the tiny insects, resembling mosquitoes or fruit flies, which sometimes swarm around potted houseplants. Despite being annoying, the 1/16- to 1/2-inch-long adults don't harm the plants, but the females will lay eggs in the damp potting soil. The larvae that hatch from those eggs can grow from 1/4 to 1/2 inch long with black heads and translucent bodies. They may feed on the fine roots of your houseplants, reducing the plants' vitality. Fungus gnats are especially prevalent around plants that require moist conditions, such as carnivorous plants and those in terrariums.
Take a Closer Look
To prevent fungus gnats from infesting your houseplants, be careful about the new plants you bring into your home. When you are shopping for plants, look for signs of trouble. If tiny insects fly up when you move a pot, take your business elsewhere. Provided the seller doesn't mind, you also can scrape away soil near the base of a particular plant to see whether any transparent "worms" are lurking just beneath the surface.
Dry Out for Good
Female fungus gnats look for damp soil in which to lay eggs. To discourage them from choosing your plants, wait until each plant's top 2 inches of soil dry out before you water. If you experiment with pouring water into a plant's saucer, so that its soil can draw up moisture through the pot's drainage holes, you may be able to determine how much water is required to moisten the roots without wetting the surface of the soil. In that case, you can allow the upper couple inches to remain dry.
Show a Little Sand
A 1/4-inch layer of medium or coarse horticultural sand placed on top of your houseplants' soil should also stave off gnats. Sandblasting sand will work as well, or any type in which the grains are of roughly equal size. Because the larvae require decaying organic matter on which to feed, females usually won't lay their eggs in a medium that doesn't contain it.
Make a Fresh Start
The older potting soil is, the more it breaks down into the damp and fungus-rich condition preferred by the gnats. Because of this, it's a good idea to repot your plants at least once a year in fresh potting mix. Avoid buying bags of potting soil that have holes in them or those that have been left outside, as those bags may bring more gnats into your home.