Keep dogs out of the yard by erecting structures to prevent their entry, applying dog deterrents and making the yard as uninteresting to other dogs as possible. Making small changes in the family dog's care can prevent other dogs from roaming into the yard.
While expensive, fences work well to keep dogs out. Some dogs may be deterred by a low fence, while others require a large fence with electric wire to keep them out. Another option to consider is planting thorny bushes around the edges of the yard. These bushes, when fully grown, act like fences to keep dogs away.
Try spreading dog deterrents around the border of the yard. Commercial products are available, and they include offensive-smelling granules or sprays and motion-activated sprinklers. When the dog smells the unpleasant scent or gets sprayed by water, it no longer wants to visit the yard. Look in the kitchen for dog deterrents to try before heading to the store. Dogs find the smell of ammonia and vinegar repulsive, and pepper and citrus smells irritate and annoy dogs. Spread these smells throughout the yard to keep dogs away.
Make the yard uninteresting for dogs. Feed the family dog inside to prevent the smell of its food from attracting other dogs. Pick up the family dog's waste as soon as possible. Any dog excrement in the yard makes other dogs want to visit for a smell. Cover freshly dug soil in gardens with chicken wire to discourage dogs from digging. Avoid using animal by-products on the garden, such as blood meal or fish emulsion.