Making a trap to capture the fruit flies is very simple and one of the best ways to do so is by using apple cider vinegar. Pouring a small amount into a container such as a jam jar or baby food jar and piercing a few holes in the lid is enough to catch the flies. They are able to get in through the holes as the smell from the apple will attract them but will be unable to get back out. By adding a small amount of liquid soap to the vinegar the density of the liquid will change so that the flies will not be able to climb back out.
Fruit flies in drain areas can be cleared using a mixture of bicarbonate of soda and white vinegar. The mixture can be poured into the drain and left a short while then simply rinsed away. This is also good for cleaning up spills that may attract the fruit flies, and cleaning out refrigerators. It is one of the most popular home remedies for removing smells too which will also deter fruit flies from the home.
Once you have removed the fruit flies from your home you need to keep it that way. By storing fruits and vegetables in the refrigerator there is less risk of them attracting the fruit fly. If fruits need to be ripened, then they should be stored in a paper bag. Overripe and rotting fruits are the biggest attraction for fruit flies and the paper bag will help to reduce the moisture surrounding the fruits and therefore slow the ripening process. Fruits left to ripen on a countertop will ripen quickly but attract a lot of fruit flies too.