Say "no digging" firmly when you catch them. Distract with toys. Praise for stopping.
Use Verbal Cues
Bury wires or chicken wire to deter digging spots. Spray unpleasant scents. Place large rocks.
Set Physical Barriers
Redirect urge with appropriate chew toys instead. Durable rubber toys work well.
Give Chew Toys
Adequate walks and play reduces boredom digging. Try games and training for mental exercise too.
More Exercise
As last resort, use underground shock wire system to automatically correct digging.
Shock Correction
Teach allowed "go dig" spot like a sandbox. Use cue when they dig elsewhere. Redirect.
Train "Go Dig" Cue
If anxiety related, treat the cause. More affection, walks and enrichment reduce stress digging.
Manage Stress