Last active
April 29, 2024 03:41
-
-
Save gene1wood/a4a9f134052edde4edc0e56969f2d5ed to your computer and use it in GitHub Desktop.
Command to remove all apt gpg keys in /etc/apt/keyrings from /etc/apt/trusted.gpg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for keyfile in /etc/apt/keyrings/*.asc; do echo "$keyfile"; cat "$keyfile" | gpg --with-colons --import-options show-only --import | awk -F: '$1 == "fpr" {print $10}' | xargs --verbose -L 1 apt-key del; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment