While snakes are fascinating and useful creatures, helping to keep down populations of rodents and other pests, people often prefer not to have them around their homes and gardens. Sometimes this aversion is justified as some areas have high concentrations of poisonous snakes, increasing the chance of being bitten by one. Generally, the most effective thing you can do to keep snakes away from your home is to remove the kinds of habitat that they prefer (cool, damp nooks and crannies, or overgrown and cluttered yards). Some poisons might also help in getting rid of snakes.
Use rat poison to eliminate rodents, which are a major attraction for snakes that prey on them. Removing their food supply will discourage snakes from frequenting your home and property.
Scatter mothballs around your home and in nooks and crannies where snakes might be hiding.
Spread sulfur powder around the house. Sulfur is believed to be a snake repellent.