Even if you don't own any cats or dogs, chances are your neighbours do. Repellents and obstacles are two ways of dealing with unwanted visitors. There are many animal repellents on the market. You can also scatter mothballs around your beds.
Other deterrents: install visible or invisible fencing, erect landscaping barriers—benches or garden ornaments—plant shrubs that look solid, or place flagstones close together in areas frequented by animals.
Softwood or cocoa bean mulches and gravel can all deter cats from making deposits. Place landscape cloth or chicken wire just under the soil. Motion-activated sprinklers and noise-makers may keep animals away.
Toilet training your pet
Provide a kitty bathroom—place some sand in a sheltered corner and plant catnip next to it. Initially, move solid waste to this area to encourage use of the site. A doggie toilet can be installed in a flat area covered with soil or pea gravel. Male dogs can be encouraged to use the area by installing a post or other vertical surface the dog can mark. Successfully training a dog to use the area may take a few weeks, but it will be worth the effort.
Feces should be removed daily to minimize the risk of parasite transmission. Areas where pets frequently urinate should be watered once or twice a day to dilute urine and minimize plant damage.
Strongly ingrained behaviours, such as digging, can worsen if the dog is bored. But if Fido gets lots of exercise, he'll be too tired to cause havoc.