Apple cider vinegar traps fruit flies when mixed with dish soap. Cleaning your trash can regularly and rinsing food residue from containers prevents odors that attract fruit flies. Scented liners and ...