Commercial snake repellents can be purchased, and recipes for homemade ones are available on the Internet. Since I’ve never used any of these substances, I have no idea how effective they are. Safety of the repellents for humans and pets needs to be considered when making or using them.
Other prevention techniques may be useful for someone who wants to repel snakes. One of these is the removal of yard debris in which snakes can hide, such as wood piles and compost. Keeping grass short is essential. It would also be a good idea to keep bushy plants as far away from the foundation of the house as possible. Removing potential food sources for a snake’s prey is also essential. Pet food shouldn’t be left outside. If food for wild birds is placed in the garden, its use should be reconsidered. Fruit that’s fallen from plants should be quickly and regularly removed.
Checking around the outside of a home for areas where snakes could enter or hide is a good prevention strategy. The foundation of the house should be checked for holes or cracks. If any are found, they should be repaired. The same routine should be used for garages, doors, and screens. If openings to the home are required for pipes, the area around the pipe should be sealed. Any vents should be covered with a screen.