How to undo upgrades?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
Stauricus
Posts: 29
Joined: 2013-11-06 11:51

How to undo upgrades?

#1 Post by Stauricus »

hello everybody!
i'd like to know if is there any way to undo upgrades. i like the Testing version, but sometimes new dist-upgrades will bug the system.
is it possible to save the "states" of all my current packages, so i can undo anything that goes wrong? i mean, downgrade everything again?

i found this:

Code: Select all

dpkg --get-selections > package_list
to backup;
and

Code: Select all

cat package_list | sudo dpkg --set-selections && sudo apt-get dselect-upgrade
to restore.

but would it work?

thanks in advance! :mrgreen:

User avatar
Head_on_a_Stick
Posts: 14113
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 135 times

Re: How to undo upgrades?

#2 Post by Head_on_a_Stick »

Use btrfs snapshots
deadbang

User avatar
Stauricus
Posts: 29
Joined: 2013-11-06 11:51

Re: How to undo upgrades?

#3 Post by Stauricus »

interesting, this seems to be something like Windows' System Restore. but isn't any simpler way of just downgrading packages to their versions before the update?

User avatar
Head_on_a_Stick
Posts: 14113
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 135 times

Re: How to undo upgrades?

#4 Post by Head_on_a_Stick »

Stauricus wrote:any simpler way of just downgrading packages to their versions before the update?
Well, you could try this:

Code: Select all

# dpkg -i --force-downgrade /var/cache/apt/archives/packages/$package_$version_$arch.deb
Disclaimer: I only use Debian stable and the above is something I would do in Arch, it may be entirely inappropriate for Debian.

We have a few testing/unstable users who can offer better advice than me.
deadbang

User avatar
mardybear
Posts: 994
Joined: 2014-01-19 03:30

Re: How to undo upgrades?

#5 Post by mardybear »

Stauricus wrote:interesting, this seems to be something like Windows' System Restore. but isn't any simpler way of just downgrading packages to their versions before the update?
The purpose of testing is to figure out breakages not avoid them. In Debian the best way to return to the exact same state is with Clonezilla, though a hassle and not all that quick. You may want to switch to stable, which rarely has any issues. Or maybe you're using the wrong distribution. Ubuntu has a ppa for timeshift and systemback (http://iasptk.com/install-timeshift-and ... u-via-ppa/). In Tiny Core, removing a broken extension removes every single file created by the extension, other than /home configs. Simply delete the broken extension and replace with the known working version, reboot and minimal time lost.
800mhz, 512mb ram, dCore-jessie (Tiny Core with Debian Jessie packages) with BusyBox and Fluxbox.
Most don't have computer access, reuse or pay forward an old computer.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: How to undo upgrades?

#6 Post by dasein »

mardybear wrote:The purpose of testing is to figure out breakages not avoid them.
+1

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1542
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 109 times
Been thanked: 261 times

Re: How to undo upgrades?

#7 Post by steve_v »

Stauricus wrote:i like the Testing version, but sometimes new dist-upgrades will bug the system.
If you don't like bugs, you don't like Testing. As it's name implies, testing exists for... testing, it's not intended as a daily use distribution at all.
As suggested, you could manually replace the packages from the cache, but that may well cause as many problems as it solves.
The only really safe answer to downgrading is filesystem snapshots, I like ZFS but I hear BTRFS is getting pretty good too.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

User avatar
Head_on_a_Stick
Posts: 14113
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 135 times

Re: How to undo upgrades?

#8 Post by Head_on_a_Stick »

Found this today:
http://snapshot.debian.org/
deadbang

User avatar
Stauricus
Posts: 29
Joined: 2013-11-06 11:51

Re: How to undo upgrades?

#9 Post by Stauricus »

i've been using Testing for about two years now, and i only really care about the bugs when i'm unable to start the system. yet i still like it. i just want some safer way to upgrade.
i'll chek out these snapshots, thanks eveybody for the help :D

User avatar
sunrat
Site admin
Site admin
Posts: 7504
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 135 times
Been thanked: 678 times

Re: How to undo upgrades?

#10 Post by sunrat »

I usually just make a root partition backup with Clonezilla before doing major upgrades. Takes about 5 minutes on my system. Backup /home as well if it's on a separate partition.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Post Reply