- 列出目前的公私鑰,其中有一筆 key id 907CE30E 公鑰。
[deyu1@kvm8 ~]$ gpg --list-keys
/root/.gnupg/pubring.gpg
------------------------
pub 2048R/01D10468 2014-06-05
uid abc123 (abc123) <abc123@csie.cyut.edu.tw>
sub 2048R/192D59C1 2014-06-05
pub 2048R/907CE30E 2013-06-20
uid De-Yu Wang (rhcx) <dywang7@gamil.com>
sub 2048R/26F7F452 2013-06-20
- 刪除 key id 907CE30E 公鑰。
[deyu1@kvm8 ~]$ gpg --delete-keys 907CE30E
gpg (GnuPG) 2.0.14; Copyright (C) 2009 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 2048R/907CE30E 2013-06-20 De-Yu Wang (rhcx) <dywang7@gamil.com>
Delete this key from the keyring? (y/N) y
- 再列出目前的公私鑰,key id 907CE30E 公鑰已不見。
[deyu1@kvm8 ~]$ gpg --list-keys
/root/.gnupg/pubring.gpg
------------------------
pub 2048R/01D10468 2014-06-05
uid abc123 (abc123) <abc123@csie.cyut.edu.tw>
sub 2048R/192D59C1 2014-06-05