Cannot update missing file

Synchronising package databases…
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: Starting full system upgrade…
error: could not open file /var/lib/pacman/local/llvm-13.0.1-6/desc: No such file or directory
resolving dependencies…
looking for conflicting packages…
warning: could not fully load metadata for package llvm-13.0.1-6
error: failed to prepare transaction (invalid or corrupted package)

I am stuck and do not know what to do.

Search the forum to prepare transaction (invalid or corrupted package)

Or internet

To find

I actually solved by taking a risk as I have up-to-date iso on usb… looked in pamac and found a later version of llvm. Installed with fingers crossed, it was a 14 version. Installed just fine and archived the old 13 corrupted file. Yeah updates now done. No idea why my problems happened anyway as I always keep my system updated.

Glad you found a solution that worked. :thinking: However, it is concerning that llvm version 14 was installed, which is an AUR package llvm-gi. So you actually have llvm-git and llvm installed? What does pacman -Q | grep -i llvm show now? If it were me, I’d be uninstalling llvm-git and do what is necessary to get llvm installed to reduce problems in the future. Plus AUR is not supported by Manjaro.

I just wanted to mention that under /var/lib/pacman there are two subdirectories, local and sync. sync is the meta-data of all possible software that exists on the Manjaro repositories. The -S operation uses it. Example commands are: pacman -Ss <regexp> or pacman -Si <pkg>. local is the installed software on your system. pacman -Q uses the local database. If you look in the local directory, you should see a directory for each package that is installed on your system. If you look inside of one of those installed package directories, you will see multiple files: desc, files, mtree. Now 99.99‾% of the time, a user should NEVER need to manipulate the local directory.

Notice the file in the message: /var/lib/pacman/local/llvm-13.0.1-6/desc

For some reason the installed package llvm appeared corrupted on your system. Could have happened during the last update. You probably will never know. You could check the pacman log for anything unusual.

  • grep llvm /var/log/pacman.log
  • grep -Ei -e '(error|warning)' /var/log/pacman.log

Potential solution might be:

For completeness, the archived and compressed packages are downloaded from the Manjaro repositories to /var/cache/pacman/pkg/. There is a systemd timer (pamac-cleancache.timer) that keeps 3 copies of each package by default (systemctl list-timers).

Checkout: pacman/Tips and tricks - ArchWiki