How to rollback an "apt-get install dist-upgrade"?

17,747

I think that short of having a backup before the upgrade and revert to it, it's almost impossible in general.

The upgrade can have modified config files that could possibly not work with older version... and there is normally no track of this and no automated way to go back.

When brtfs will be ready for prime time, we could have snapshots before each upgrade, but for now, your idea is the most viable one.

Although I suggest trying to see if you can find what caused a problem, and eventually file a bug report about it. Having "held" packages is a sure way to problems in the future.

Share:
17,747

Related videos on Youtube

Max Ricardo Mercurio Ribeiro
Author by

Max Ricardo Mercurio Ribeiro

Updated on September 18, 2022

Comments

  • Max Ricardo Mercurio Ribeiro
    Max Ricardo Mercurio Ribeiro over 1 year

    In order to get up-to-date with some kernel libraries, I tried to upgrade my Ubuntu 13.10 using sudo apt-get install dist-upgrade. However, after upgrading it the results were not satisfactory at all and, as a matter of fact, I am experiencing some performance issues now and slow booting…

    I browsed several forums and solutions in order to rollback my system as it was before upgrade. However I didn't find an official solution so far, such as apt-get rollback ... sort of.

    The most reasonable (and smart) solution I have found it was look up at the /var/log/apt/history.log and browse the content for the latest upgrade to find the previous libraries versions and manually reinstalling each one of them (and removing the new ones prior).

    There is a reasonable solution that helped me out to figure this workaround.

    However, I was wondering if maybe someone has knowledge about any official tool to perform such rollback operation.

    Does anyone has any ideas to rollback an upgraded system?

    I would really appreciate any efforts, thanks in advance!

    • Braiam
      Braiam about 10 years
      Err.. you cant.
    • Rmano
      Rmano about 10 years
      Why the close vote and downvotes? I think it's a clear and reasonable question. Pity the answer is "you can't".
    • precise
      precise about 10 years
      Did you try booting with your previous kernel version at the grub screen? If that works, you'd like this too: How do I change the GRUB boot order?
    • zxq9
      zxq9 almost 9 years
      This is part of why I run a boring, almost-nothing-installed base system to host KVM, and then run guests that do the real work. That way I can backup the VMs before getting adventurous, and be very boring and cautious with the VM host as it doesn't need to do anything interesting. That also means the host's package list is really tiny, so manually rolling back things isn't a nightmare, and package update interactions are usually pretty obvious.
  • Max Ricardo Mercurio Ribeiro
    Max Ricardo Mercurio Ribeiro about 10 years
    Ah nice !! Now we are talking about ! I've never heard about "btrfs" but I browsed and it is exactly what I am looking for.
  • Rmano
    Rmano about 10 years
    If you are adventurous and want to try, there is an article series on LWN.net that explain the basic usage of brtfs.