Do you have a toller that's a digger? Digging is a natural instinct and you should always remember that it is virtually impossible to extinguish a behavior that is natural instinct. What I prefer to do is teach the pup the difference between "good dig" and "no dig."
What I do is set up a sand box in the yard. You can use an actual child's sandbox or buy a kiddie pool and fill it with sand or use any plastic container, like a cement mixing tub. It doesn't have to be very big. Fill it with playground grade sand and make sure you have a cover for it. If you don't cover it at night, stray cats and other animals may use it as a litter box.
Put some rubber dog toys and dog biscuits in the sand box. You can even bury a couple. Bring your dog over to the sand box and say "good dig" in your best happy voice. If your pup starts digging in your favorite flower garden, tell him "ah ah, no dig" and gently coax him over to the sand box reminding him that the sand box is the place for "good dig." Every week or two rotate other rubber toys into the sand box so it is always an exciting place to visit. In no time, your pup will be avoiding the flower garden and running straight over to its sand box. Hope this helps!