Arch Linux - Keyring Corrupted
- https://www.reddit.com/r/archlinux/comments/wbroq8/archinstall_error_on_updating_keyring/
Every so often EndevourOS/Arch Linux keyrings will expire/corrupt? and need to be reinitialized. When trying to do an upgrade with paru/pacman you will get a ...archlinux-keyring-20220727-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)) are you sure you want to remove it? Y/n
error when this happens.
This is the solution that worked to fix that:
sudo killall gpg-agent
sudo rm -rf /etc/pacman.d/gnupg
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman-key --populate endeavouros
# IF using chaotic-aur
sudo pacman-key --populate chaotic
Simple,
- Update all the keyrings (arch, endeavour, chaotic-aur) and then install pacman updates through paru
sudo pacman -Sy --noconfirm ; sudo pacman -Sy archlinux-keyring --noconfirm ; sudo pacman -Sy endeavouros-keyring --noconfirm; sudo pacman -Sy chaotic-keyring --noconfirm; paru -Syu --noconfirm
Longer Process:
- 1 liner WITH Chaotic-AUR and EndeavourOS
sudo pacman -Sy --noconfirm ; paru -Sy archlinux-keyring --noconfirm ; sudo pacman -Sy endeavouros-keyring --noconfirm; sudo pacman -Sy chaotic-keyring; sudo killall gpg-agent ; paru -Sc --noconfirm ; sudo rm -rf /etc/pacman.d/gnupg ; sudo pacman-key --init ; sudo pacman-key --populate archlinux ; sudo pacman-key --populate endeavouros ; sudo pacman-key --populate chaotic ; sudo pacman-key --refresh-keys ; reboot
1 liner without chaotic-AUR
sudo killall gpg-agent ; sudo rm -rf /etc/pacman.d/gnupg ; sudo pacman-key --init ; sudo pacman-key --populate archlinux ; sudo pacman-key --populate endeavouros ; sudo pacman-key --refresh-keys
If you were using Chaotic-AUR, you will need to reinstall it most likely:https://aur.chaotic.cx/
Last updated on July 17, 2024. For any questions/feedback, email me at blog@zinchuk.xyz.