According to Garden Mentors, fruit flies can easily be deterred from plants with sticky traps, which are pesticide-free sheets of paper that naturally attract pests. Fruit flies can also be controlled with splash bait, an organic liquid that is sprayed directly onto the foliage. Splash bait is laced with a natural pesticide that instantly kills the flies once they ingest it.
Wine or vinegar traps are another natural remedy that work well to banish fruit flies. The traps consist of a funnel placed in a glass of wine or vinegar. When fruit flies are naturally attracted to the funnel hole emitting the scent, they fly down the hole and drown in the liquid.
Fruit flies are often confused with fungus gnats, which are tiny flies that are attracted to plant potting soil. Fungus gnats are black in color and have skinny bodies, while fruit flies are rounder on their back ends and are orange to light brown in color. Both species are attracted to moisture and indoor compost, but fruit flies are more likely to swarm around fruit bowls and trash cans, while fungus gnats are drawn to houseplants. A swarm of fungus gnats surrounding a houseplant can indicate too much moisture in the soil. Allowing houseplants to dry out for a few days can help to eliminate the gnats.