I added more confirmation prompts before deleting all keys and primary keys in particular.
- Factor out the secret key deletion code into a static function to facilitate future changes.
- Confirm the deletion of each individual key. Allows the user to delete keys interactively.
- Add another confirmation prompt for primary keys. Emphasizes to the user that a primary key will be deleted.
Here are the patches: