Fungus gnats are primarily a pest of plants, particularly house plants. They can be of greatest problem when plants are overwatered. This is because these gnats, particularly the females, are attracted to moist soil and organic matter. The females seek out these areas in which to lay their eggs ... thus compounding the problem when the eggs hatch.
Fungus gnats are tiny, about 1/8 inch long, and are very fragile-looking - much like a very, very small mosquito. They are generally very dark in color and have a unique pattern on their wings that forms the shape of a Y. They do not bite or otherwise harm humans, so they are not a health hazard, however, they can damage plants and be of great nuisance as they fly around plants in homes.
Fungus gnats can also become a major nuisance in offices when plants are overwatered. Overwatering can cause a fungus to build up in/on the soil, and it is this organic matter to which the gnats are attracted.
When the larvae hatch from the "planted" eggs, they will feed on organic matter as well as the roots and root hairs of the plants in which they hatch. This can eventually cause the plant to wilt and die. The larva are clear and wormlike, with a black head.
Although the fungus gnats live for only a few days, new larvae can continually hatch then emerge as adults, making the gnats an ever bigger problem.
Fungus Gnat Control
The first step in their control is to reduce the frequency of watering, allowing the soil to dry completely between waterings, so that the gnats cannot live and grow in the soil. This will also limit the growth of soil fungus on which the gnats live ... as their name implies.
It may also be beneficial, or even necessary, to repot the plants in new, fresh soil.
Chemical Control. Fungus gnats can be chemically controlled with house-plant sprays that are labeled for fungus gnats and contain pyrethrins or pyrethroids. However, the University of Missouri Extension says, "Because the adult flies live only a few days and new adults emerge daily, you need to use these sprays every few days for at least two weeks before populations are reduced." Always read and follow all label directions when using any pesticide.
Non-Chemical Control. Some studies suggest that fungus gnats are repelled by linalool, an ingredient in some dryer sheets.