Error “error: failed to commit transaction (invalid or corrupted package)” (SOLVED)
December 7, 2022
When using pacman while updating packages, for example
sudo pacman -Syu
An error may occur:
error: binutils: signature from "Frederik Schwan <firstname.lastname@example.org>" is unknown trust :: File /var/cache/pacman/pkg/binutils-2.39-4-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)). Do you want to delete it? [Y/n]
If you choose the proposed option – remove an invalid or damaged package – then the update will fail with the following error:
error: failed to commit transaction (invalid or corrupted package) Errors occurred, no packages were upgraded.
The specific error message in your case may be different, for example, another package may be invalid or corrupted, or the PGP signature may belong to another person.
In any case, to fix the error, start by reinstalling the archlinux-keyring package:
sudo pacman -S archlinux-keyring
After that, the system update should pass without error.
sudo pacman -Syu
- pacman error “warning: failed to retrieve some files” (SOLVED) (100%)
- How to completely uninstall a package along with dependencies on Arch Linux (as well as BlackArch and Manjaro) (97.1%)
- How to view package information in Arch Linux (BlackArch, Manjaro) (97.1%)
- How to download a package without installation in Arch Linux and Manjaro. How to download the AUR package source code (97.1%)
- Analogue of the --force option in pacman (86.5%)
- Error “Authentication helper program /usr/lib64/squid/basic_ncsa_auth: (2) No such file or directory” (SOLVED) (RANDOM - 52.9%)