You are not logged in.

#1 2015-08-24 20:34:55

AlexanderHolmgaard
Member
Registered: 2014-11-18
Posts: 57

Undo last "pacman -Syu"

Hello!
Today I ran pacman -Syu and after rebooting the system stop "moving". I looked in /var/log/pacman.log but a lot of packages were installed and I'm not sure which one. I would prefer not to downgrade all of them individually to find out which one it was. Is there a way to just entirely revert the last update?

Offline

#2 2015-08-24 20:40:37

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Undo last "pacman -Syu"

Restore your backup.

Offline

#3 2015-08-24 20:42:05

AlexanderHolmgaard
Member
Registered: 2014-11-18
Posts: 57

Re: Undo last "pacman -Syu"

I am not sure what (or how) you mean?

Offline

#4 2015-08-24 20:46:01

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Undo last "pacman -Syu"

Your system was backed up, right?

The restoration method depends on the backup strategy employed.

Offline

#5 2015-08-24 20:49:22

AlexanderHolmgaard
Member
Registered: 2014-11-18
Posts: 57

Re: Undo last "pacman -Syu"

Unless it does so automatically, it wasn't..

Offline

#6 2015-08-24 20:49:41

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Undo last "pacman -Syu"

Rather than attempting to restore to a non-existent backup; diagnose your issue: "stopped moving" means nothing.

Look at your logs and journal and try and identify the issue: see How To Ask Questions The Smart Way.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2015-08-25 17:25:17

AlexanderHolmgaard
Member
Registered: 2014-11-18
Posts: 57

Re: Undo last "pacman -Syu"

Thanks, I will try and do that.

Offline

#8 2015-08-25 18:30:17

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: Undo last "pacman -Syu"

As a side note, this is why it is recommended to frequently update. Read pacman output. Deal with pacnew files etc.  Do not blindly update a million packages at once every blue moon.  Please describe your issue further. Not what you think will fix it.

Offline

#9 2015-08-25 20:11:16

oliver
Member
Registered: 2007-12-12
Posts: 448

Re: Undo last "pacman -Syu"

your /var/log/pacman.log should have the time you initiated the upgrade.  It will also have a line for each package that was upgraded (look for ALPM) that tells you the version it upgraded from and the version it upgraded to

If it's only a couple you could manually work it out quite easily - anything more than 5 or 6 and I'd be looking to script something.

But determining the root cause of your issue is the way to go

Offline

#10 2019-04-18 10:12:16

klumba89
Member
Registered: 2019-04-18
Posts: 1

Re: Undo last "pacman -Syu"

After doing a full system upgrade recently (with pacman -Syu), my gamepad stopped being recognised in Wine games. Native games still detected the gamepad just fine,so my first thought was that it would be due to the new Wine version which had gone from 3.4 to 3.5. However, when I ran any of the games in Play-on-Linux with it set to use Wine 3.4, the gamepad still didn't work. I concluded that one of the other packages that had been upgraded must have somehow prevented Wine from accessing the gamepad.

Unfortunately, it had been a couple of weeks since my last update, and there had been a total of 94 packages updated, including the Linux kernel. I didn't relish the idea of manually downgrading each likely package one by one until I found the one that broke gamepad support, so I did a bit of Googling, and found out about the Arch archives. All older versions of Arch packages are stored here - a total of over 100,000 packages.

The archives make it easy to roll back your system to any date in the past. All you need to do is point pacman at the archive specifying the date you want to roll back to in the URL, refresh your local package database and upgrade your system.

So to roll back your entire system to a specific past date, run the following as root:

    # back up mirrorlist first
    cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.old
 
    # point mirrorlist to the archive specifying date to rollback to e.g. to return to 5th April:
    echo 'Server=https://archive.archlinux.org/repos/2018/04/05/$repo/os/$arch' > /etc/pacman.d/mirrorlist
 
    # do a full system upgrade (double 'y' refreshes your package database, double 'u' allows pacman to downgrade packages)
    pacman -Syyuu

Don't forget to reboot if this downgrades the kernel or graphics drivers.

Source: https://www.rdeeson.com/weblog/176/how- … arch-linux

Offline

#11 2019-04-18 10:18:09

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Undo last "pacman -Syu"

^ Holy necrobump Batman!

That's a nice idea but what about any manual interventions that may have been advised by the news page?

Have you actually tested this method to see what happens in such situations?

Offline

#12 2019-04-18 10:33:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,616

Re: Undo last "pacman -Syu"

Please don't necrobump old topics, and don't post links to potentially outdated blog posts for things that are readily available in the wiki

Closing.

Offline

Board footer

Powered by FluxBB