Skip to content

Instantly share code, notes, and snippets.

@wadouk
Last active January 5, 2022 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wadouk/58e1f4d770ac8bb205935026ffa6b73f to your computer and use it in GitHub Desktop.
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
# 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
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