Last active
January 5, 2022 21:14
-
-
Save wadouk/58e1f4d770ac8bb205935026ffa6b73f to your computer and use it in GitHub Desktop.
pacman manjaro archlinux partial upgrade. It could be usefull when a global upgrade doesn't go write to rollback all and retry some to find the one fail whole system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://linuxconfig.org/how-to-rollback-pacman-updates-in-arch-linux | |
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"*; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pacman -Qu | grep python | cut -d " " -f 1 | sudo pacman -S - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment