Rats dislike the smell of peppermint, daffodils and hyacinths. Peppermint extract is not effective as a rat deterrent, but a rag or cotton balls soaked with peppermint oil can drive rats out of hiding. They are also repelled by the smell of toilet cakes crumbled up near their homes.
Peppermint oil is not effective outdoors because it is likely to be washed away by rain, but planting peppermint along with other herbs and flowers can cause rats to avoid the house or yard. Another tip is to mix peppermint oil with water in a spray bottle and spray it throughout the house.
Toilet cakes are caustic and can be dangerous to leave around if there are children present. However, they are highly effective at repelling rats and causing them to abandon their nests and holes. Toilet cakes dissolve quickly, however, and need to be replenished frequently.
When installing rat repellents, people should also make sure they are not producing any smells that attract rats. Even a dirty and smelly shovel can attract rats. Pet food is very pungent, allowing rats to track the odor from far away. Compost should not be left open and food scraps should be buried at least a foot underground. Bird feeders can also attract rats that like the smell of the seed hulls.