How to kill mice without harming pets?

I’ve used electronic mouse repellents before. They’re supposed to emit sounds that only mice can hear, which makes them leave. They don’t affect my dog at all.