Garlic’s pungent smell can be overwhelming for rodents who dislike it. When rodents find garlic at entry points, they will run away and look for a new place to infest.