Peppermint oil does get rid of rats.
To get rid of rats and mice with peppermint oil soak some cotton balls with peppermint oil and place the cotton balls around areas where mice or rats are getting into your home or hanging around your home.
The mice and rats do not like the scent of peppermint oil and will avoid the areas where the peppermint oil soaked cotton balls are.
You'll need to replace the cotton balls 1 to 2 times per week with fresh cotton balls with more peppermint oil since the peppermint oil will wear off the cotton balls and be ineffective after awhile.
The peppermint oil won't kill the rats or mice but the peppermint oil will keep the mice or rats away.