Raccoons can live almost anywhere. Many of them have adapted quite well to urban environments and can become pests, eating animal food and stealing from fruit trees and vegetable gardens. Keeping raccoons out is difficult due to their size, their lack of fear of lights and noises, and because of their excellent climbing dexterity. Raccoons often walk on fences to get from one location to another, or they can travel from tree to tree or simply walk along the ground if dogs are not present. This makes stopping raccoons particularly difficult.
Attach plastic or metal spikes to the top of your fences. These spikes are specifically designed to discourage raccoons, squirrels and other animals from walking along the top of your fence. The spikes must cover at least 3 feet of the top of the fence at each end of the yard, if raccoons are to be kept from entering the yard via the "fence highway".
Electrify the fence with a minimum or one and preferably two "hot" electric wires at the top of the fence. Electric fencing should only be installed by a qualified professional. The electric charge will not be enough to kill a raccoon, but simply discourage it.
Cut all tree branches that hang over fences or which come close enough to a fence that a raccoon could leap from the branch to the fence.
Tape crumpled pieces of aluminum foil on top of your fences. Raccoons do not like to walk on crumpled aluminum foil, although this deterrent will deteriorate over time and will have to be replaced at frequent intervals.