1

I am currently running Debian "testing", and I have just upgraded Gimp from version 2.10.8-2 to version 2.10.8-2+b1. Sadly, it does not work for me. I can't open any image, not even create a new blank image, as it crashes every time.

Hoping that the repository would have at least a few versions of the package, I tried to downgrade with

apt install gimp=2.10.8-2

and also

apt-get install gimp=2.10.8-2

But both failed with Version '2.10.8-2' for 'gimp' was not found.

Is there a reliable way to downgrade any package in Debian? Perhaps some sort of "rollback" after an unsatisfactory upgrade?

I considered adding the stable repository and forcing the downgrade at times, possibly pinning back the offending packages. But I would like a less drastic solution first, considering that this might require too many dependencies to be downgraded. Might cause more problems than it solves.

  • By the way, I tried to report a bug, but reportbug is crashing with an uncaught socket.timeout exception. – giusti Sep 10 '19 at 2:30
  • 1
    Do you have the older version in /var/cache/apt/archives? – muru Sep 10 '19 at 2:42
  • Possible duplicate of superuser.com/questions/459480/downgrading-packages-in-debian – ajgringo619 Sep 10 '19 at 2:43
  • Rather than going through the trouble of downgrading it, you're better off building it from source. You can get the source code here: download.gimp.org/mirror/pub/gimp/v2.10 – Nasir Riley Sep 10 '19 at 2:45
  • @muru Looks like I have 6 versions of that package. I could install manually! Is there any trick to help with potential dependencies? – giusti Sep 10 '19 at 2:48
4

The apt tools don’t support rolling back, so there’s no straightforward way to undo an upgrade. You need to identify the packages you want to downgrade, and find the corresponding binaries to give to either apt or dpkg. There are a number of approaches you can use.

The most general one is to use snapshot.debian.org. This contains a copy of every single package uploaded to the Debian archives, and also provides snapshot repositories with a coherent set of packages for a given timestamp. In your case, you’d look for the appropriate version of the gimp source package, then add the corresponding repository to your sources (see the main page for instructions).

Another approach which works in this particular instance, and which you’ve considered, is to add Debian 10 to your repositories, since the version of the gimp package you want to downgrade to is available there. Currently this won’t result in any downgrading apart from the gimp packages; you’ll only end up with libopenexr23 alongside libopenexr24.

Finally, since you still have the older package in the apt archives (/var/cache/apt/archives), you can install it from there, either using dpkg -i, or by turning your cache into a repository:

  • copy all the packages somewhere safe
  • create the Packages file: dpkg-scanpackages . > Packages (in the directory you copied all the packages to; you’ll need dpkg-dev for dpkg-scanpackages)
  • compress the Packages file: gzip < Packages > Packages.gz (this keeps both files)
  • create the Release file: apt-ftparchive -o "APT::FTPArchive::Release::Origin=cache-repository" release . > Release (you’ll need apt-utils for apt-ftparchive)
  • sign it: gpg --yes --sign --armor --clearsign --output InRelease Release

Then you can add a deb file:/path/to/... entry to your repositories and install packages from there. (You can skip the signing step if you tell apt to assume the repository is trusted.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.