You can repel rats in your home and garden with scents they don't like, such as clover, garlic, onion, hot peppers containing capsaicin, household ammonia, used coffee grounds, peppermint, eucalyptus, predator (cat) scent, white vinegar and citronella oil. The most effective scents are essential oils, specifically peppermint, castor and citronella. These are good options because, while their smell is powerful, many people also find the scents pleasant. Another common option is vinegar, but a strong vinegar smell at home isn't ideal and is too much for some people.
The best condiments you can use to repel rats when it comes to what rats hate are cayenne pepper, black pepper, or red chili flakes. Citronella smells clean and fresh and, as expected, is a deterrent for rats. Rats hate this smell because it's strong and because it disguises the smell of food and predators in the area. Make a mixture of 10% citronella and 90% water.
Spray this into the rat's space or soak cotton balls in the mixture and place them where the rats live. Rats and other similar rodents have a harder time finding food in nature than in a human home, and therefore, if you forget to take out the trash for a few days or don't hire a pest control center to take care of the other pests you may have in the house, rats can take it as an invitation and don't hesitate to enter your house.