Unlike other insect pests, flies don't usually harm plants -- although they can be bothersome pests. No one likes to be greeted by a swarm of flies every time they water their plants, but this is unfortunately a common occurrence, especially around indoor plants. Fly traps can help solve the problem if used correctly. For best results, choose a trap designed to catch the specific type of fly bothering your plants.

...

Yellow Sticky Cards

...

Yellow sticky cards attract adult flies with their bright color. When they fly near to investigate, they become stuck to the card. This kills the adult flies, but it doesn't prevent already-laid eggs from hatching. Sticky yellow cards or strips are most effective against fungus gnats, which are tiny, black, flying insects that thrive in the rich, moist environment of houseplant soil. The cards can also be effective at trapping other types of flies as well. Place yellow sticky cards along the edges of container plants or under the plants' canopies. To trap fungus gnat larvae, insert slices of raw potatoes into the soil. Once the larvae attach themselves to the potatoes, remove them and throw them out.

Fly Paper

...

Fly paper is sticky like yellow cards, but instead of attracting flies with a bright color, the paper is treated with a sweet fragrance that attracts the insect pests. In some brands of fly paper, the sticky substance also contains trace amounts of pesticide. Fly paper comes in different forms, including strips, squares or tape. Fly paper is effective at trapping blow flies, house flies, fungus gnats and other flies. It is most effective at treating small populations of flies. Hang fly paper near plants that are infested with flies, or near windows and doors that are often left open.

DDVP Pest Strips

...

Dichlorvos-impregnated resin strips, or DDVP strips, are treated with a powerful organophosphate pesticide. The strips are sometimes also colored bright yellow or treated with a scent to attract insects. DDVP strips slowly release the pesticide in the form of a vapor -- some work for up to four months. The pesticide works by overstimulating nerve cells. Flies and other insects that come into contact with the vapor quickly die. Unfortunately, DDVP is not considered safe to use in living areas, such as living rooms, kitchens or other occupied places because the vapor can cause illness in humans. The Centers for Disease Control and Prevention says most problems are caused by users not following label instructions. The strips should only be used in attics and other unoccupied places, and safety precautions should be taken when installing them, such as wearing gloves and eye protection. DDVP strips will kill flies, cockroaches and most other insect pests.

Fermentation Traps

...

Fermentation traps are designed to lure flies to their deaths with the sweet-smelling odor of freshly rotting fruit or active yeast. When the flies hone in to feed, they find themselves unable to escape. Such traps feature a narrow opening at the top that funnels the flies to a compartment at the bottom that holds the yeast or rotting fruit. Most of the flies will be unable to climb back up out of the trap. These traps are often homemade with common materials such as empty 2-liter soda bottles and work to kill any type of fly that is attracted to fermenting liquid or fruit, such as fruit flies.