There are multiple methods that can be used to repel raccoons, including using commercial pest repellent granules and sprays and sprinkling mothballs or cayenne pepper around the property. Motion-activated lights and sprinklers designed to scare raccoons and other pests away can also be used.
Electric fences may also help to keep raccoons away, but it usually takes two wires, one that's about 5 inches above the ground and another that's approximately 12 inches above ground. It is also possible to make a pest repellent spray by boiling one jalapeño pepper, one white onion and 1 tablespoon of cayenne pepper in 2 quarts of water. This mixture can be sprayed around the property to keep raccoons and other pests away, and it only lasts for a few days before respraying is necessary.
Loud noises or human voices can also scare raccoons away, which is why some people recommend leaving a radio on outside tuned to a talk show station. Having a dog outside can also deter raccoons from entering a property.
It is also important to make sure that there are no possible food sources for the raccoons. Always keep trash inside or in a sturdy can with a locking lid, and never leave pet food outside at night.