This script or commands if used line by line can help restore packages

in the pacman cache from a previous update that might be having issues.

Modify the date to match when you did the update and it will help

restore those specific packages that were updated.

Because of terminal wrapping you need to keep an eye on the line wraps.

:: Script Start

:~# grep -a upgraded /var/log/pacman.log | grep 2020-11-30 >

/tmp/lastupdates.txt

awk '{print $4}' /tmp/lastupdates.txt > /tmp/lines1;awk '{print $5}'

/tmp/lastupdates.txt | sed 's/(/-/g' > /tmp/lines2

paste /tmp/lines1 /tmp/lines2 > /tmp/lines

tr -d "[:blank:]" < /tmp/lines > /tmp/packages

cd /var/cache/pacman/pkg/

for i in $(cat /tmp/packages); do sudo pacman --noconfirm -U

"$i"*.zst; done

:: Script Done

Proxy Information
Original URL
gemini://bbs.archaicbinary.net/blog/how-to/2024.11.21-Restore_ArchLinux_Packages.txt
Status Code
Success (20)
Meta
text/plain;lang=en-US
Capsule Response Time
497.30421 milliseconds
Gemini-to-HTML Time
0.579623 milliseconds

This content has been proxied by September (3851b).