Tuesday, March 21, 2023

flatpak: How to deal with unwanted package updates


Not all software is available as package for my Linux distribution. That's why I use flatpak for some applications. Recently, a new app version introduced a bug. It resulted in random crashes. So I looked into a way to get back to an older, more stable app version.

Identify older flatpak app versions

The command "remote-info" lists information about the app ("the.app.identifier"). It includes the update history and helps to find commit identifiers.

flatpak remote-info --log flathub the.app.identifier

Update to an older app version

With the update command, ideally run as superuser, install the version identified by the commit identifier.

sudo flatpak update --commit=thecommmitid the.app.identifier

Prevent automatic updates

If the system automatically looks for package updates, you need to mask the app. That keeps the older version installed. There is no unmask command, but an option to remove the mask later on.

sudo flatpak mask --system the.app.identifier

sudo flatpak mask --system the.app.identifier --remove

That's it for today. If you have feedback, suggestions, or questions about this post, please reach out to me on Twitter (@data_henrik), Mastodon (@data_henrik@mastodon.social), or LinkedIn.