To get rid of fruit flies in the home, take an empty jar and mix a tablespoon or two of water and apple cider vinegar, and sugar together in the jar. Then, add a few drops of dishwasher detergent, mix it up and leave the jar open nearby the fruit bowl in your kitchen. The fruit flies will be attracted to the sweet, fermented smell and will go to the jar instead of the fruit.