ward off
Definitions
To repel or turn aside a danger, threat, or attack.
To prevent something unpleasant or harmful from affecting someone.
Examples
He carried a wooden staff to ward off any wild animals he might encounter on the trail.
Drinking plenty of water and getting enough sleep can help ward off a common cold.