If the neighborhood stray cats have turned your yard into a hangout, you may have to try several tricks to get them out. Most local laws allow cats to roam free, and it is a crime to harm them. You can always buy a commercial cat repellent and scatter or spray it in the places where the cats are doing their business, but that can get expensive. There are some homemade solutions that might work for a while, but what works for one cat might not work for another.
How to Keep Stray Cats Out of Your Yard
Scatter items around the yard that cats don't like. These can be orange and lemon peels (cats dislike citrus smells), cayenne pepper, chili pepper flakes, coffee grounds, pipe tobacco, and lavender, lemon grass, citronella, peppermint or mustard oils.
Scatter pine cones in the areas. Ponderosa or other prickly cones work best.
Install a motion sensor sprinkler. The sprinkler will startle the cats, and they will hate the water that hits them. The cats will get wise to it, so it will need to be moved every few weeks to remain effective.
Work the Coleus-Canina plant into your yard. The plant is also known as the "Scaredy-Cat" because it emits an odor offensive to cats but not to humans. Another extreme plant option is the green onion. If you have green onions about every 5 feet, the cats will likely stay out of the lawn.