Created
May 15, 2024 15:05
-
-
Save riivanov/16cef81493c4f06ba4982a221974ec7c to your computer and use it in GitHub Desktop.
How to downgrade all Arch packages
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment