How to install a previous version of Gimp with Flatpak on Ubuntu 20.04?

I'm on stock Ubuntu 20.04.2, and I have managed to install the latest / current Gimp with Flatpak: it was the 2.10.24 version at the time.

However, there are a few issues with the 2.10 line that I can't seem to be able to resolve.

For this reason, I would like to install Gimp 2.8.

I know that that older Gimp version may rely on an older Python version as well, so installing the whole thing with Flatpak seems to be handy, as it will be standalone (isolated from the OS) and can use its own (older) Python version without any complication at all.

But I can't seem to be able to find out how to even list the currently supported Gimp package versions with Flatpak, let alone installing it.

So please: how can I see which Gimp versions (apart from the most recent one) are installable with Flatpak currently, and how can I install a specific version?

(Also, can it complicate things that I already have another (more recent) Gimp version installed with Flatpak? So, can I have two versions parallel, or would I have to delete the more recent one first in order to install the older one?)


Update:

I have followed the guidance in @wizardpurple's answer, and have found the following:

  • This is Gimp's Flathub page.
  • This is the Gimp flatpak's github repo.
  • They don't have releases, nor specific versions tagged. It's just git commits indeed.
  • Here is a commit where 2.10.0 was released. So I take it, almost any other commit before that one could be good?
  • This seems to be the latest commit involving 2.8.

So now I have run the command:

$ sudo flatpak update --commit=19dcc22b60e69eaaf740d4311021ed55b7e2537d org.gimp.GIMP

But it says:

Looking for updates…

        ID                                        Branch     Op     Remote      Download
 1.     org.freedesktop.Platform.GL.default       20.08      u      flathub     < 100.8 MB
 2.     org.freedesktop.Platform.VAAPI.Intel      20.08      u      flathub      < 11.6 MB
 3.     org.gnome.Platform.Locale                 40         u      flathub     < 333.7 MB (partial)
 4.     org.gtk.Gtk3theme.Yaru-light              3.22       u      flathub     < 203.4 kB
 5.     org.gnome.Platform                        40         u      flathub     < 362.6 MB
 6.     org.gimp.GIMP                             stable     u      flathub     < 117.2 MB

Proceed with these changes to the system installation? [Y/n]:

These appear to be dependencies of the Gimp flatpak. Apparently they are needed for this older Gimp? I already have these installed, due to how Gimp 2.10.24 needed them; are these / some of these also going to be downgraded?

My concern is that while this flatpak ecosystem is indeed isolated from the main OS, it seems that internally it still maintains some dependencies. So I don't know whether I mess up this flatpak ecosystem by downgrading Gimp...


Update 2:

I have run the flatpak update --commit command, and it died as follows:

First it went through all the dependencies without a problem (while it consistently downloaded less data for each of them correspondingly as the download size was up front indicated), then when it reached Gimp, as the last item, it went:

OSTree:ERROR:src/libostree/ostree-core.c:1432:ostree_checksum_inplace_to_bytes: assertion failed: (checksum[j])
Bail out! OSTree:ERROR:src/libostree/ostree-core.c:1432:ostree_checksum_inplace_to_bytes: assertion failed: (checksum[j])
Aborted

Then the OS gave the "System program problem detected" dialog.

I suppose I could submit an issue on the Github repo.


Solution 1:

Edited with corrected information. Parts rewritten for clarity.

Summary

The simplest option for running GIMP 2.8 on Ubuntu 20.04 looks to be running it in an Ubuntu 18.04 VM (GNOME Boxes is handy) and installing it through the official repos. There might be the option of trying to build the older flatpak... However, GIMP is a beefy piece of software and building a 2-3 year old flatpak could very well produce its own set of headaches.

Installing older flatpaks versions

You can install older versions of a flatpak by specifying a specific commit to target. Available commits can be found by using the remote-info command. You need to already have the flatpak installed for this to work. The older version takes place of the newer one, since you are performing a downgrade.

The results of remote-info are not a complete history, as there appears to be a cutoff point for versions kept. Because flatpaks are used to make it easy for developers to push the latest versions of software, keeping everything would not be so easy on storage space.

# examine remote
flatpak remote-info --log flathub org.gimp.GIMP

--snip--

    Commit: c53c42d04e88c0b0c416d5b4d3aa7600d1cdbdcd36d051b1af5c4ae980e29bb2
   Subject: Build Little-CMS 2.12 ourselves. (13d146e6)
      Date: 2021-03-29 16:33:51 +0000

--snip--

# install specific commit
# root privileges required for system  
flatpak update --commit=c53c42d04e88c0b0c416d5b4d3aa7600d1cdbdcd36d051b1af5c4ae980e29bb2

# to prevent future updates, you can mask the flatpak
flatpak mask org.gimp.GIMP

The commits from the flatpak remote-info --log command cannot be substituted with the commits from GitHub as I previously thought. The GitHub commits are referenced in the output (13d146e6) in the above example but are not the ones used for moving between versions.

flatpak tips and tricks

'Possibly' Running Multiple Versions

If you wanted the latest gimp and an older version that was available from the remote-info output, you could try installing one as a system package and the other as a user package. Maybe not the most elegant of methods but it should work.

flatpak install flathub org.gimp.GIMP # system/default

# user method also requires adding the flathub repo to the user repos
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user flathub org.gimp.GIMP # user