Score:1

How do I revert the last installed updates?

gb flag

Today I just clicked yes to a few updates that my Ubuntu 20.04 LTS suggested. Since then, when I boot up my laptop everything is fine. But when it goes to suspend and wakes up the screen is flickering like every other second. When I log out and in again, the flickering is gone, but of course my session is as well and I have to start all applications again. Therefore I would like to undo whatever I have done with that update. How can I do this?

Best regards

user535733 avatar
cn flag
Well, maybe it was the update...and maybe it wasn't. Humans are really bad at mistaking correlation for causation. Check your logs (/var/log/apt/history.log) to see what was updated. Then also check your logs (/var/log/syslog and journalctl) around the time of trying to suspend to see what is *really* happening.
MDoe avatar
gb flag
Thank you. I will take a look at those logs.
Score:3
us flag

Depending on your familiarity with the package system and Ubuntu in general, this may be more trouble than you wish to take on. But in general

  • inspect the /var/log/apt/history.log file and determine the list of packages that were upgraded in the last session.
  • use aptitude or synaptic to downgrade those packages.
  • you may / are likely to / run into dependency issues when performing the second step, that may be easy or quite difficult to resolve

An example:

Start-Date: 2022-01-14 07:41:02 Commandline: apt upgrade Requested-By: [userid] (1000) Upgrade: firefox-locale-en:amd64 (95.0.1+build2-0ubuntu0.20.04.1, 96.0+build2-0ubuntu0.20.04.1), firefox:amd64 (95.0.1+build2-0ubuntu0.20.04.1, 96.0+build2-0ubuntu0.20.04.1) End-Date: 2022-01-14 07:41:27

Then in synaptic

enter image description here

Note that this takes firefox way back to version 75 which you may also not want.

raj avatar
cn flag
raj
The problem is, you usually can't downgrade the updated packages, because the previous versions have been already replaced in the repositiories by the new ones. You have to find some mirror that does not delete old versions - that's probably the hardest part (I have been lucky a few times in finding such one when I needed to downgrade). Then you have to manually download previous versions from this mirror and manually install them. Finally pin the versions in Synaptic to avoid updating again. I think Canonical **really should** keep "-1" versions in the repos and make an easy revert possible.
Organic Marble avatar
us flag
@raj the times I have tried, there has always been an old version available, although often it is very old (comes from `focal` instead of `focal-updates` or `focal-security` ) That's where this ancient firefox comes from in the example.
raj avatar
cn flag
raj
Therefore I mean specifically "-1" versions, ie. the directly previous ones before upgrade, and not some very old. If for example some package is in version x.x.x.39 and gets upgraded to x.x.x.40, the version .39 should be still kept in the repository, so that easy revert is possible.
Organic Marble avatar
us flag
@raj I would totally support that.
MDoe avatar
gb flag
Thanks very much for that elaborate answer! I will take a look at this, but I will also look for other solutions.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.