How To Deter Mice

Don't just caulk or sprayfoam holes, use the right technique with the right materials.
For Holes And Cracks Not Requiring Airflow
Sandwich Exclusion
This sandwich is no tasty morsel for mice and rats. Spray your exanding foam into the hole or crack, push your copper mesh or other metal mesh into the foam before it dries to hold it steady, then seal over the material with a sealant designed for outdoor endurance. This will ensure mice can't chew through and the materials last vs make a mess of your exterior via corrosion.
Tough Stainless Steel Wool
This material is harder to stuff in holes due to is course nature and cross woaven fabric but it won't rust and it plugs holes good as any mouse or rat will get a mouth and face full of nasty cuts. You can use the sandwich method or use it by itself as it can handle the elements. Always be cautious to no place metal mesh against metal pipes and wires.