Putting red pepper around a fence is unlikely to effectively stop a dog from digging. Dogs have a strong sense of smell, but they may be attracted to pungent odors like pepper, onions, or chili powder rather than repelled by them. Alternatives such as chicken wire fencing may be more effective.