The problem with being up-to-date with all the software packages is that you have to encounter bugs. Sometimes the developers do not test their applications enough and push for updates everywhere and the end user has to suffer (note that FOSS applications do not come with a warranty). And sometimes when everything is perfect on the developer’s end, you still might encounter bugs on your end due to unexpected reasons.
Also read: How to set up and enable Flatpaks on Linux
In this tutorial, I will show you how can you downgrade any Flatpak application on any Linux distribution as the flatpak command is very different from any distribution’s default package manager such as apt, pacman, or dnf.
Let’s now now look at the steps of downgrading flatpaks.
List the application ID
To downgrade any package, first, you will have to get the application ID of the package, to do that, you can type the following commands in your Terminal to list all the installed applications:
flatpak list --app
Now, note down the application ID of the application you want to downgrade, in my case, I will downgrade VLC, so the application ID is
Get the commit code
Now, type the following command along with your application ID to get the commit code of your application:
flatpak remote-info --log flathub <Application ID>
Do not forget to press Ctrl+C to stop the output of the above command. Now, copy the commit code of the package of any specified release date.
Downgrading the package
Type the following command along with the commit code and application ID like this to install any previous version of the package :
sudo flatpak update --commit=<commit_code> <Application ID>
Well that’s it! We have successfully downgraded the VLC media player on our system. To verify the version, once again type the following command:
flatpak list --app
As you can see, VLC has been downgraded from version 3.0.18 to 126.96.36.199.
As you can see, there is no ‘downgrade’ command in the flatpak packaging system, we have just used a trick with the ‘update’ command along with the commit code in order to downgrade VLC. Do not forget that in order to copy and paste anything on/from the terminal, you have to use Ctrl+Shift+C and Ctrl+Shift+V keyboard shortcuts.