Even confirmed animal lovers may grow frustrated when dogs trespass on their garden, uprooting plants and using the vegetables as a latrine. While few are 100 percent effective, some strategies, notably fencing, will drastically reduce such canine intrusions.
A fence is the only completely effective method for keeping dogs out of your vegetable patch. Fences should be at least 4 feet high, but 6-foot-tall fences are even more effective. You must be sure that the fence extends underground for at least 12 inches to prevent dogs from tunneling underneath. Placing a layer of gravel along the bottom of the fence can further discourage digging. Fences can be simple, constructed with smooth, metal mesh and several steel poles for support, but picket or privacy-style wooden fences work as well.
Several commercial products, touted as non-toxic to dogs and the environment, are available and may help discourage dogs from visiting your garden. However, many homemade alternatives to commercial products exist as well. You can soak clean rags in vinegar and tie them to stakes around your garden. Dogs dislike and avoid the smell of vinegar and they will often stay away from vinegar-guarded gardens. Re-soak the rags periodically to ensure they retain their offensive smell. It may be helpful to grow plants that are safe, but produce a smell that dogs don't like. You can try parsley, oregano, mint, rosemary or thyme and see if it helps remedy the problem.
Uncomfortable Walking Surfaces
Sometimes, you can dissuade dogs from encroaching on your carrots and tomatoes by forcing them to cross an uncomfortable substrate in order to reach the garden. For example, a 6-foot-wide border of rough gravel or pinecones is enough to discourage most dogs. It's important to use items that will not harm a dog’s feet; instead, the material should merely be uncomfortable for tender paws.
Elevated Gardening Techniques
If a fence is impractical, and no other strategies are working, you may want to consider transitioning to a container-style garden. Alternatively, you could construct raised beds for your garden, which dogs cannot access. This will not only help prevent dogs from urinating or defecating near the plants, but also help prevent them from chewing or otherwise harming your plants, flowers and vegetables.