STOPPING a dog from digging can often be combated with providing plenty of walks, play-time, and teaching him new tricks. Digging around the base of trees or plants could be that hunting instinct coming through as these would locations those critters can be found. Digging around the fence area is simply an attempted ‘prison-break’; think of things that will make him feel more at home in his garden.
Dogs often dig out of boredom; this is especially the case with dogs that are left alone in a garden without toys or companions.
Consider getting another dog to keep him company or if this isn’t possible leave chew toys for him to play with.
Dogs that dig while their owners are watching are acting-up, much like a child, and are simply seeking attention.
If nothing seems to be working, then try creating a ‘dig zone’ in a less visible part of the garden and fill it with easily diggable soil or sand.
Praise him when he digs in the ‘dig zone’, and tell him ‘no’ when he tries other spots and gently take him to the ‘dig zone’.