まずは現在の鍵の情報を確認。今のところ副鍵は2つ。
$ gpg --list-key XXXXXXXX pub 4096R/XXXXXXXX 2012-02-10 uid AYANOKOUZI, Ryuunosuke uid AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp> sub 4096R/YYYYYYYY 2012-02-10 sub 2048R/ZZZZZZZZ 2012-02-10
この鍵からさ以後に追加された副鍵を削除する。
$ gpg --edit-key XXXXXXXX gpg (GnuPG) 1.4.10; Copyright (C) 2008 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. Secret key is available. pub 4096R/XXXXXXXX created: 2012-02-10 expires: never usage: SC trust: ultimate validity: ultimate sub 4096R/YYYYYYYY created: 2012-02-10 expires: never usage: E sub 2048R/ZZZZZZZZ created: 2012-02-10 expires: never usage: S [ultimate] (1). AYANOKOUZI, Ryuunosuke [ultimate] (2) AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp> gpg> key 2 pub 4096R/XXXXXXXX created: 2012-02-10 expires: never usage: SC trust: ultimate validity: ultimate sub 4096R/YYYYYYYY created: 2012-02-10 expires: never usage: E sub* 2048R/ZZZZZZZZ created: 2012-02-10 expires: never usage: S [ultimate] (1). AYANOKOUZI, Ryuunosuke [ultimate] (2) AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp> gpg> delkey Do you really want to delete this key? (y/N) y pub 4096R/XXXXXXXX created: 2012-02-10 expires: never usage: SC trust: ultimate validity: ultimate sub 4096R/YYYYYYYY created: 2012-02-10 expires: never usage: E [ultimate] (1). AYANOKOUZI, Ryuunosuke [ultimate] (2) AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp> gpg> quit Save changes? (y/N) y
最後に変更内容の確認。副鍵が削除されたことがわかる。
$ gpg --list-key XXXXXXXX pub 4096R/XXXXXXXX 2012-02-10 uid AYANOKOUZI, Ryuunosuke uid AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp> sub 4096R/YYYYYYYY 2012-02-10