I had a problem with squirrels as well. They were burying peanuts all over my garden and then the peanuts would just get moldy and rot. They don't ever seem to come back and retrieve them once they bury them. I stopped putting out the whole peanuts (with shells) then they started eating my roses and the hips. They are cute, but they were definitely becoming a problem.
I solved the problem by building a feeding/nesting box for them. As yet, they haven't nested in it, but I fill it up with a wild critter feed mix purchased at a feed store. The mix does have whole peanuts with the shells in I,t but very few. I pick those out. The rest of the mix is cracked corn, sunflower seeds, etc.
This has worked like a charm so far, and there is no more evidence of their digging.