Updating Flatpak Packages
Got Flatpaks? How about updating them to newer versions?
While users tend to perform system updates now and then, they often forget to update packages of a different package manager (I'm one of them).
You have multiple choices on how you want to update Flatpak packages and I will walk you through the following:
- Update all the packages at once
- Update a specific package
- Update a package to a specific version
Update all the Flatpak packages at once
To update all the Flatpak packages at once, all you have to do is execute the flatpak
command with the update
flag as shown here:
flatpak update
To proceed further, press Y
and hit the Enter
key. That's it!
Update a specific Flatpak package
To update a specific package, you would need the application ID of that specific package and to do so, you can list the installed packages using the following command:
flatpak list
Once you know the application ID of the target package, enter the application ID in the following command:
flatpak update package_name
For example, if I want to update the Spotube package, then, I will use the following:
flatpak update com.github.KRTirtho.Spotube
Update a Flatpak package to a specific version
Each Flatpak package update is associated with a unique commit hash and by using the commit has, you can switch to that specific version.
To list available versions and their commit hash, you'd need to enter the application ID of the target package in the following command:
flatpak remote-info --log flathub <application-ID>
For example, if I want to list multiple versions of Spotube, including their commit hash, then I will use the following:
flatpak remote-info --log flathub com.github.KRTirtho.Spotube
Find the version from the given list and enter the commit hash and application ID of the package as shown here:
flatpak update --commit=<commit-hash> <application-ID>
Here's what the end command would look like:
flatpak update --commit=4fd4307d4a81093c5fa2ddba3ffbad3f7d09fa0cc66e9499e77c92b696774484 com.github.KRTirtho.Spotube
Pretty cool, right?
Wrapping Up...
In this quick tutorial, I went through how you can update flatpak packages including methods to update everything at once, updating a specific package and updating a package to a specific version.
I hope you will find this helpful.
Passionate Linux user who likes to share his knowledge and experience, not his identity.