Deter means to discourage, or literally “to frighten away.” Halloween decorations that are too scary might deter trick-or-treaters, and the risk of being expelled deters kids from cheating in school.
Deter comes from the Latin de meaning “away” and terrere meaning “frighten.” Something that deters isn’t always scary, though: citronella plants deter mosquitoes, and fines deter people from littering. Teddy Roosevelt’s foreign policy dictum “speak softly and carry a big stick” was meant to deter other countries from attacking the United States.
turn away from by persuasion
try to prevent; show opposition to