Coffee grounds can deter hedgehogs, as they do not like the strong smell. Sprinkling used coffee grounds around the perimeter of your garden or in areas where hedgehogs frequent may help to keep them away. However, the effectiveness can vary between individual hedgehogs, and the grounds may need to be replaced frequently, especially after rain.