No, coffee grounds do not keep squirrels from digging. In fact, they may actually attract squirrels to your garden or yard. Squirrels are attracted to the smell of coffee and will dig in the area where they believe there are grounds. If you have a problem with squirrels digging in your garden, it is best to remove the attractant (coffee grounds) and use a physical barrier (fence or netting) to keep them out.