Fungus gnats are small gray flies that periodically emerge from potted plants. The gnats may be a nuisance when flying to windows, but do no harm to humans.
Most kinds feed on organic matter in the soil.
To reduce their numbers, re-pot the plant into soil less rich in organic matter, let the plant dry out sufficiently between waterings and set plants outdoors when adult gnats are emerging. Vacuum up any adult gnats attracted to lights or windows. The University of Arizona , College of Agriculture , Cooperative Extension , in Maricopa County .