The Hose Method
While some cats will tolerate a bath, most cats hate being wet. When you see a cat digging in your yard, spray the cat with a quick stream of water from the hose. Another option is to keep a spray bottle or squirt gun handy to spray the cat in the act. The cat will begin to associate digging in your yard with something negative and be less likely to visit your garden when it needs to go.
Cats are more prone use areas of your yard where you have loose soil and few plants. These are also good areas to use barriers to keep cats from digging. Push away a thin layer of soil, place chicken wire or landscape fabric in the bare spots and then cover the chicken wire with the soil. When the cat tries to dig out a bathroom, it won't be able to and will move on.
Plants Cats Avoid
Rue's (Ruta graveolens) frilly foliage and bright yellow flowers makes it an attractive addition to an herb or meadow garden. Another benefit is that cats dislike the smell and will avoid it. Another plant cats avoid is called the scaredy cat plant (Coleus canina). Although the plant grows as a weed in Europe, its purple flowers add interest to a semi-shady area. Since this plant is part of the mint family, it can quickly take over so it is best to plant it in containers spaced around the yard.
Several items in your pantry have scents that deter cats including chili powder, cayenne pepper, mustard and coffee grounds. You can either make a "tea" with them and then use a squirt bottle to spritz the concoction around the yard, or you can sprinkle the items directly onto the soil. Oils such as lemon oil, citronella oil and eucalyptus oil also keep cats at bay.