Mailing List Archive

Bulk removal of expired keys
On the URL:
<http://gnupg.10057.n7.nabble.com/gpg2-on-a-Windows-10-Pro-64-bit-machine-td51332.html>
there is a listing for "pgpclean.ps1" that I have used successfully
on my Windows machine. Is there any similar program for use on a
FreeBSD based OS? My primary goal is to remove all expired keys and
refresh the remaining ones if necessary.

--
Jerry
Re: Bulk removal of expired keys [ In reply to ]
On 2020-02-24 07:44, Jerry wrote:
> <http://gnupg.10057.n7.nabble.com/gpg2-on-a-Windows-10-Pro-64-bit-machine-td51332.html>
> there is a listing for "pgpclean.ps1"...

gpgclean.ps1. "PGP" is a registered trademark of Symantec. The free
software version is GPG.

> Is there any similar program for use on a
> FreeBSD based OS?

No, but if you give me until tonight there can be.


_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Bulk removal of expired keys [ In reply to ]
On Mon, 24 Feb 2020 12:01:42 -0500, Robert J. Hansen stated:
>On 2020-02-24 07:44, Jerry wrote:
>> <http://gnupg.10057.n7.nabble.com/gpg2-on-a-Windows-10-Pro-64-bit-machine-td51332.html>
>> there is a listing for "pgpclean.ps1"...
>
>gpgclean.ps1. "PGP" is a registered trademark of Symantec. The free
>software version is GPG.
>
>> Is there any similar program for use on a
>> FreeBSD based OS?
>
>No, but if you give me until tonight there can be.

Well, if you are not going to put a rush on it, I guess I will have too. :)

--
Jerry
Re: Bulk removal of expired keys [ In reply to ]
jerry@seibercom.net [2020-02-24T07:44:10-05] wrote:

> Is there any similar program for use on a FreeBSD based OS? My primary
> goal is to remove all expired keys and refresh the remaining ones if
> necessary.

For the primary goal of removing expired keys:

gpg --list-keys --with-colons | awk -F: '
$1 == "pub" && $2 == "e" {expired = 1}
$1 == "fpr" && expired == 1 {print $10; expired = 0}' | \
xargs echo gpg --batch --yes --delete-keys

Remove the "echo" when you are sure.

--
/// OpenPGP key: 4E1055DC84E9DFF613D78557719D69D324539450
// https://keys.openpgp.org/search?q=tlikonen@iki.fi
/ https://keybase.io/tlikonen https://github.com/tlikonen