Vinegar, especially white or apple cider vinegar, is a powerful natural remedy for repelling ants and trapping fruit flies. A mixture of equal parts vinegar and water can be sprayed along doorways, window sills, and ant trails to erase their scent paths. For fruit flies, a small dish of apple cider vinegar mixed with a few drops of dish soap can act as an effective trap.