An unneutered male will seek out females in heat, so sterilization may put an end to this desire to roam.
Social pups, such as Siberian Huskies and Irish Setters, dig out to seek company.
Either refrain from putting this type of dog out in the yard unless you can join it, or consider getting a second dog for company - especially if you're frequently gone long hours.
These breeds are terrific candidates for doggie daycare, because they're unusually dog-friendly and have energy to burn.
If you don't have a doggie daycare available in your area, consider leaving your dog with a relative or neighbor who works from home, or hiring a dog-walker to come in midday to give your dog a romp.
Is your scenthound (such as a Beagle, Bassett Hound or coonhound) digging out to chase prey or track down smelly goodies from the street buffet? A genetic predisposition makes this behavior difficult to combat.
First, only let these breeds out in the yard with supervision.
Second, prepare a distracting food-dispensing toy ahead of time and hide it in the yard.
Now the dog will see its yard as a rewarding place and have less desire to seek food elsewhere.
Third, reinforce the bottom of your fence line.
This may entail pouring a 6 to 12 inch cement trough beneath the fence line or burying additional wire fencing in an L-formation 6 to 12 inches underground, and extending 2 to 3 feet into the yard.
Railroad ties, concrete blocks or large boulders laid against the base of the fence may also inhibit digging to escape.
Not every puppy bent on escape chooses to tunnel out; some climb or jump out.
You can prevent climbing by choosing fencing that doesn't offer footholds, like chain-link does.
Prevent over-the-top escapes by choosing a fence that is taller than your dog is able to jump.
Or try landscaping the fence line so the area is difficult to clear.
Attach brackets to the fence top that angle in toward the yard from which to hang taut wire or loose wire mesh netting as a further deterrent to jumping.
Teach your pup to respect barriers to prevent it from scaling your fence in an attempt to escape.
Start training in the house by blocking a doorway with a pet or baby gate.
Visit with the puppy while standing on the other side of the gate.
If the puppy sits or stands quietly, reward the good behavior with touch, treats, praise or play.
As your pup is about to put its feet on the gate, issue a verbal warning, such as "Uh-Uh!" or "Get Off!"