Trimming tree branches back at least 10 feet from your roof is perhaps the easiest and most effective way of keeping squirrels out of your building. This way they won’t be able to reach the roof and find a way in from there.