Update fails after some time

Updated after couple months using yay -Syyu.
Update fails after some time with a meesage /var/cache/ … pacman missing.

I found out pacman is now missing.

I restored to my latest backup 11/dec/2023 using timeshift and repeated the update process using pacman -Syyu

same failure, but this time appart from pacman someother libraries are missing and cannot run timeshift. I manually restored missing timeshift libs and manage to restore the latest bckup from 11/12/2023.

Not sure how should I proceed in order to update the system properly. Any advise? am I doing something wrong?

Open a new topic and provide actual logs.

It rather sounds like something on your system has got corrupted before the upgrade. I’d suggest going back to an earlier backup and making sure your system is fully operational before trying to upgrade again.

1 Like

Impossible to deduce anything from this message.

Please open a terminal emulator and run

sudo pacman -Syu

Then use the mouse to mark the text inside the terminal emulator (the last 20-30 lines or so should suffice) and paste it into a comment inside a code fence like this example

```
the terminal text
```
1 Like

Missing critical system files after a restored backup? Sounds like hardware failure which is probably not, so provide logs please.

1 Like

Hi all, thanks very much for your help.

Instead of full update, I tried only with pacman, which seems to be the origin of the problem, The update fails and pacman is no longer in the system:


~/projects >>> yay -S pacman                                                                                                                                                                                                                                                                                                                                                                                             [130]
Sync Explicit (1): pacman-6.0.2-16
resolving dependencies...
looking for conflicting packages...

Packages (1) pacman-6.0.2-16

Total Installed Size:  4,84 MiB
Net Upgrade Size:      0,00 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                                                                                                                                                                                                            [##############################################################################################################################################################] 100%
(1/1) checking package integrity                                                                                                                                                                                                                          [##############################################################################################################################################################] 100%
(1/1) loading package files                                                                                                                                                                                                                               [##############################################################################################################################################################] 100%
(1/1) checking for file conflicts                                                                                                                                                                                                                         [##############################################################################################################################################################] 100%
(1/1) checking available disk space                                                                                                                                                                                                                       [##############################################################################################################################################################] 100%
:: Processing package changes...
error: could not open file /var/cache/pacman/pkg/pacman-6.0.2-16-x86_64.pkg.tar.zst: No such file or directory
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
 -> error installing repo packages

yay is a pacman wrapper. So it wont work without it.

The source of your problem … is whatever you did to remove pacman.

You can try to use pamac I guess?

pamac install pacman

Otherwise … hope its in your cache or look at other workarounds;
https://wiki.archlinux.org/title/Pacman#Manually_reinstalling_pacman

Thanks for the advice, I’ll try to do that. Just for clarification, yes, I know yay is wrapping pacman, but everything is fine before I execute “yay -S pacman”. I mean pacman is removed as a consequence of this operation somehow… Also libalpm.so.13 is not there anymore.

pamac install pacman                                                                                                                  
pamac: error while loading shared libraries: libalpm.so.13: cannot open shared object file: No such file or directory

It might be easier to just reinstall.

Boot live ISO and mount your root partition under /mnt and run:

pacman -r /mnt -Syu pacman --cachedir /mnt/var/cache/pacman/pkg [ --dbpath /mnt/var/lib/pacman ] [ --gpgdir /mnt/etc/pacman.d/gnupg ]

(run what’s in the brackets if it’s not working without)

Through the link I downloaded “pacman-static” and after deleting empty folder “/var/lib/pacman/pacman-6.0.2-16” I was able to reinstall pacman.

After that I could make a full update with no issue apparently. No idea why could the pacman update kept getting “corrupted” in the first place though.

thanks all for your advice.

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