delete gpg keys

Problem

My GPG Key Pair expired so needed to delete the existing one and replace with a new one

Solution

  • First list the gpg keys:

imela@whiscardz ~ $ gpg –list-keys
pub 4096R/5443F656 2018-09-06 [expired: 2019-09-06]
uid Whiscard imela (implementations encryption) <imela@whiscardz.org>

  • Delete the secret key first

imela@whiscardz ~ $ gpg –delete-secret-keys 5443F656
gpg (GnuPG) 1.4.20; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

sec 4096R/5443F656 2018-09-06 Whiscard imela (implementations encryption) <imela@whiscardz.org>

Delete this key from the keyring? (y/N) y
This is a secret key! – really delete? (y/N) y

  • Then delete the public key

imela@whiscardz ~ $ gpg –delete-keys 5443F656
gpg (GnuPG) 1.4.20; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

pub 4096R/5443F656 2018-09-06 Whiscard imela (implementations encryption) <imela@whiscardz.org>

Delete this key from the keyring? (y/N)y

References

https://serverfault.com/questions/214605/gpg-does-not-have-enough-entropy

https://www.howtoforge.com/helping-the-random-number-generator-to-gain-enough-entropy-with-rng-tools-debian-lenny

http://blog.chapagain.com.np/gpg-remove-keys-from-your-public-keyring/

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s