Cover up potential entrances, such as uncapped chimneys, loose shingles and openings in attics, roofs and eaves. If you're not sure where raccoons are getting in, sprinkle flour around potential entrances and check for footprints later. You can also stuff a rag or ball of paper in a suspect hole and check later to see if it has been removed. Make a raccoon den unlivable. Sprinkle naphtha flakes or predator urine around the area or hang ammonia-soaked cotton rags near the entrance and keep the area brightly lit.
Raccoons dislike loud noises, bright lights and strong smells.
Use the same methods in your garden or in the area where you keep your garbage or composter. Always cover composters and garbage cans. Use a bungie cord or a heavy weight to keep the lid in place. Make sure that all raccoons or other animals have left before sealing up holes in any part of a building. Block the entrances to a raccoon den once you're sure all the animals have left.