president of Black Pest Prevention, told Homes and Gardens, "Having a strong scent, plants like garlic and onions can deter snakes and other pests." If you'd like to try using allium flowers to ...