Fungus gnats get their name due to the food of the larvae, which feed on molds and fungi found in damp locations. They commonly are found in homes due to moisture sources in potted plants, under appliances, in crawl spaces or beneath slabs, in moisture problems within walls, or from damp locations in exterior landscape. In mushroom farms their numbers can be explosive. Some species also feed on the roots of plants, while others may feed within plant tissue as leaf-miners. On occasion the small larvae may migrate from the feeding source in long, snake-like masses, moving to a drier location to pupate. The length of time from egg to adult may be less than 2 weeks, depending on the temperature.
Control of sources of moisture, and the resulting fungi or decaying organic material, is the key to the control of fungus gnats. They are drawn to lights as adults, but light traps and residual sprays will not affect the larvae that are hidden in a protected, damp environment.