# Migrating keys between cards If you had keys assigned to an old card, you'll need to delete them and re-assign to a new card. To do that: 1. Find your keygrips on the new card: ``` $ gpg2 --card-status --with-keygrip | grep keygrip ``` 2. Delete (or move away) the corresponding files in `~/.gnupg/private-keys-v1.d` 3. Unplug your smart card. 4. Restart `gpg-agent` 5. Plug your card back in and run `gpg2 --card-status` That should re-assign your keys to the new card.