Pamac: Error: Failed to prepare transaction: invalid or corrupted database

Hi Everyone,

Every time I am using, pamac for updating aur pacmages i am getting below error, but pacman seems to work fine

āžœ  ~ pamac update -a                      
Preparing...
Synchronizing package databases...
unable to lock database
Failed to synchronize databases
Refreshing AUR...                                                                                                                                                                                                   
Checking slack-desktop dependencies...                                                                                                                                                                              
Checking google-chrome dependencies...
Checking visual-studio-code-bin dependencies...
Checking postman-bin dependencies...
Error: Failed to prepare transaction: invalid or corrupted database



Edit build files : [e] 
Apply transaction ? [e/y/N] y

Transaction cancelled.

Tried all these commands but nothing seems to work:

sudo pacman-mirrors --fasttrack
sudo rm /var/lib/pacman/sync/
sudo pacman-key --init
sudo pacman-key --refresh-keys
sudo pacman-key --populate archlinux manjaro
sudo pacman -Syyu
1 Like

You could try and force a refresh of the database:

pamac update --force-refresh 
9 Likes

Thank you @NGr ,

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.