The best way to repel black rat snakes is to remove the things that attract them to an area, typically places where they or their favorite food animals can hide. Commercial snake repellents, ultrasonic devices and ground vibrators are usually ineffective. Fencing can work but is expensive and labor-intensive.
Black rat snakes are found from New England south to Georgia and as far west as Oklahoma. They are nonvenomous and benefit humans by eating rats and other small rodents. They are shy animals and usually try to avoid contact with humans but may bite when confronted.
Piles of debris and leaves, areas of dense vegetation, and walls or soil covered with thick ground vegetation serve as hiding places for both the snakes and the rodents they feed on, so removing such things encourages the snakes to move elsewhere. Practicing good rodent-control measures by keeping garbage in tightly sealed cans, picking up fruit that has fallen from trees and using traps where appropriate is also helpful. Both snakes and rodents can enter houses through small holes, so finding and sealing these entries keeps snakes out of homes. Snake fencing made of hardware cloth can protect limited areas but must be at least 38 inches tall and extend at least four feet into the soil to be effective.