There are some commercial sprays such as Scram that are said to work and last for about a week. If the cat (
Felis domesticus) is digging in flower beds, you can place chicken wire on the surface of the soil. You will still be able to plant through the chicken wire, but the cat won't be able to cover the feces and will look for another location. There are also soft spiked products that can be placed in the garden that cats don't want to step on. Additionally, if cats are located in one particular spot, a product called a scat mat can be effective. It delivers a low intensity shock to animals that step on it. Some suggest, where legal, cage trapping the cat, spraying it with water, and then letting it go. The cat will be very unhappy, and you want it to associate this unhappiness with that location.
If these suggestions don't work, then you may need to employ trapping (provided it is legal in your area). We would suggest cage trapping. Information on cage trapping cats can be found in the links below. Even if it is legal, however, you should know that the cat lobby is extremely powerful and vocal. These individuals believe that cats have a "right" to roam freely and won't take kindly to your controlling them.
Resources: (online)
Feral House Cats
Feral Cats
Browse related Faqs by tag:
horticulture, wildlife damage management