Tiny flies found on houseplants are usually either fungus gnats or whiteflies. Both of these insects are greenhouse pests that often enter the home on infested plants. Check plants carefully before purchasing them. You can sometimes detect a whitefly or fungus gnat infestation by giving the foliage a gentle shake. If a cloud of tiny insects rises above the plant, pass on it. Protect the houseplants you have now by keeping new plants isolated for a month or so before placing them near other plants.
Frequently mistaken for fruit flies, fungus gnats are tiny, dark-colored, flying insects. The adults don't harm plants or the people that tend them, but they are a nuisance. You may see them sitting or crawling on the soil's surface or lower leaves, and they sometimes collect around windows. Their worm-like larvae live in the potting soil, feeding on plant roots and lower leaves that touch the soil.
Fungus Gnat Control
Fungus gnats and their larvae thrive in moist conditions, so the first step in managing this pest is reducing the moisture in the growing medium. Allowing the potting soil to dry between waterings may control fungus gnats. If you still see them after a few weeks, try using an insecticide labeled for use against fungus gnats; make sure it is also labeled as safe to use on houseplants. Trap adult gnats with yellow sticky traps placed under the foliage, and trap larvae with pieces of potato placed cut-side down on the potting soil. Traps reduce the numbers of insects and help monitor their presence, but don't completely control them.
About 1/16 inch long, adult whiteflies sit on the undersides of leaves where they feed by sucking sap from the foliage. As they feed, they secrete a sticky substance called honeydew which is host to the sooty mold fungus. You may notice the black spots caused by the sooty mold before the whiteflies. Their tiny, almost translucent nymphs are hard to see, but they also feed by sucking sap from the plant, causing stunted, yellow leaves that drop from the plant and an overall loss of vigor.
Whiteflies are difficult to kill, and you may find that destroying the plant is the only option. Sticky traps catch some insects but won't control an infestation. Washing the undersides of leaves with a damp sponge is also helpful, and it removes the honeydew and sooty mold as well as insects, larvae and eggs. Insecticides are worth trying, particularly if the plant is valuable, but they aren't very effective and require several applications.