What Causes Fruit Flies?
Fruit flies zero in on moist, fermenting organic material, such as fruits and vegetables or in drains and garbage cans. They lay their eggs in these rotting areas. After the eggs hatch, they continue to feed on the waste material.
How to Get Rid of Fruit Flies
This is one pest that you can usually contain on your own. First, try to consume fruits and vegetables in a timely manner. Clean drains out regularly with a mixture of baking soda and vinegar. Wash garbage cans out regularly as well.
To get rid of fruit flies after they have appeared, put a little bit of cider vinegar in a glass. Cover it with plastic wrap and secure that with a rubber band. Poke a few holes in the cling wrap. The flies will be drawn in by the vinegar but won’t be able to get back out again. You can even try leaving out a beer bottle with a little beer left in it. They won’t be able to climb up the neck of the bottle once inside.