As a backyard gardener, I had a problem this spring with varmints digging up my potted tomatoes and sweet peppers. I suspected that squirrels were the culprits.
Instead of resorting to trapping the suspects, I simply covered the top of the pots with a layer of aluminum foil and punched holes in the foil to allow water to seep through. No more problems with varmints. I don’t know whether it’s the shiny surface or the crinkly sound it makes when touched that keeps them off, but it turns out aluminum foil is a great varmint repeller.
Applying a shiny layer has the further advantage of reflecting light onto the plant, helpful for locations such as my deck, which gets a barely adequate six hours of sunlight per day.