Just passing by, Lord and other gents, but I have my two coins to add.
1. Best way to deter raccoons is to not feed them. Cat food is a HUGE attractant to racoons (and skunk and possum), so if you or any of your neighbors feed their cats outdoors put a stop to that! And make sure trashcans are secure. If they're stealing food from your garden, try repellents. Pepper sprays (on trees) or carnivore urine (for and ofc don't use any chemicals if you're growing vegs.
Here are some tips and information on repellers:
https://www.havahart.com/articles/keep-raccoons-away-from-your-trash
Though I'd recommend you to stay out of so-called ultrasonic repellers. There was a thread about them in the past:
https://www.mywoodlot.com/forum/pests/110-will-ultrasonic-pest-repeller-work-for-me - and even though some of forum members like VanBrackle and Robert recommended them I can't agree. The internet is filled with recommendations, such as these
https://menacetopests.com/ but from my experience devices are not effective. They may help out a little at first, but after time I’ve seen roaches, bugs and rats crawling right on them w/o any signs of panic.
But I have another trick. Motion detector lights and automated sprinklers may keep them from coming around. It's an element of surprise that might scare them off. Keep that in mind.
2. After all food is secure and is not available to coons, you need to set some traps. Live trapping coon is pretty easy and if in town animal control will usually let you borrow the traps. Also they could provide you with the instructions where you could relocate them.
From my experience, If you trap and release, 30 miles should be fine (worked for us as we followed the official guidelines). But ask animal control in your area first, as it might be illegal.
I've been at war with raccoons several years ago. So if you have other questions, feel free to ask, I'll try to help.
Good luck.
- Anthony