Hahaha. How do you stop a terrier from digging?!?
Buddy, if you figure that one out, you're a genius.
With Milo, we just keep an eye on him, and when he starts to dig, tell him " NO!" and redirect his attention, give him a toy or something.
Also, giving him a sandbox or something is good, you can bury some yummy treats or toys in there so he'd rather dig there then in the garden.