Fungus gnats are small, dark, short-lived gnats, of the families Sciaridae, Diadocidiidae, Ditomyiidae, Keroplatidae, Bolitophilidae, and Mycetophilidae (order Diptera); they comprise six of the seven families placed in the superfamily Sciaroidea.
The larvae of most species feed on fungi, decaying plant material, or plant roots, helping in the decomposition of organic matter; some species are predatory. The adults are 2–8 millimetres (0.079–0.315 in) long, and are occasionally pollinators of plants and carriers of mushroom spores. They also may carry diseases such as pythium (which causes "damping-off" to kill seedlings) on their feet.
Most fungus gnats are weak fliers, and can often be seen walking rapidly over plants and soil, rather than flying. However when airborne, the gnats may be quite annoying to humans by flying into their faces, eyes, and noses, both indoors and outdoors. These flies are sometimes confused with drain flies.
Some fungus gnats are exceptionally hardy, being able to tolerate cold conditions through their possession of antifreeze proteins. Typically, overwintering organisms can either avoid freezing or tolerate freezing, but Excechia nugatoria can do both. For E. nugatoria, the production of noncolligative antifreeze proteins (NAPs) protect the head and thorax from freezing, but they do not protect the abdomen. Freezing of the head and thorax in other insects tends to have adverse effects on neural tissue, so it is not surprising that these protective mechanisms have been observed in certain species, but E. nugatoria is the only insect known to semi-freeze through the winter, which may be an evolutionary advantage. According to Sformo, by allowing the abdomen to freeze, evaporative water loss is reduced over the course of the winter.
Fungus gnats in the family Sciaridae may be pests, but are typically harmless to healthy plants - and humans - but can inflict extensive damage to seedlings; their presence can indicate more serious problems. In houseplants, the presence of sciarids may indicate overwatering; they may be feeding on roots that have been immersed in water too long and are thus rotting, or the gnats may be attracted to fungus growing in saturated topsoil. Consequently, allowing the soil to dry may reduce their numbers. The pests are sometimes also managed by placing a layer of sandor indoor mulch on top of the soil around plants; by introducing Hypoaspis miles mites or applying the biological larvicide Bacillus thuringiensis (var. israelensis) to kill gnat larvae; by drenching the soil annually in an insecticidal soap. Hydrogen peroxide can be mixed with water and used to kill fungus gnat larvae in infected soil with a mixture of one part 3% hydrogen peroxide mixed with four parts water, then applied to the soil. Adults can be trapped with yellow sticky traps made of yellow card stock or heavy paper coated in an adhesive since the adults are attracted to the color yellow.
Since the gnats are weak fliers, fan-based traps as well as other fly-killing devices may be used to help control free-flying gnats, especially indoors. There are a number of toxic and non-toxic methods of controlling sciarids and their larvae, including nematodes, diatomaceous earth, or powdered cinnamon.
Commercial greenhouses typically employ the insect growth regulator diflubenzuron for control of fungus gnats and their larvae. It is applied to infected soil and will kill fungus gnat larvae for 30-60 days from a single application. Its mechanism of action is to interfere with chitin production and deposition and it also triggers insect larvae to molt early without a properly formed exoskeleton, resulting in the death of the larvae. Although it is targeted at fungus gnat larvae, care should be taken in applying it as it is highly toxic to aquatic invertebrates. Diflubenzuron typically has no toxic effect on adults; only the larvae are affected. 
|Wikimedia Commons has media related to Fungus gnat.|