mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-01 21:50:13 +08:00
116 lines
4.3 KiB
Markdown
116 lines
4.3 KiB
Markdown
[#]: subject: "How to Downgrade Flatpak Packages in Linux"
|
||
[#]: via: "https://itsfoss.com/downgrade-flatpak-packages/"
|
||
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
|
||
[#]: collector: "lkxed"
|
||
[#]: translator: "geekpi"
|
||
[#]: reviewer: " "
|
||
[#]: publisher: " "
|
||
[#]: url: " "
|
||
|
||
How to Downgrade Flatpak Packages in Linux
|
||
======
|
||
|
||
Technically, minor or point release updates are released to solve issues. But things may get worse when some updates break your current workflow.
|
||
|
||
Whether a Flatpak package or Snap, everything breaks at some point when there is an issue. Being a sandboxed packaging solution, it may not affect the entire system, but if you encounter a bug that makes your app experience worse, you may regret the update.
|
||
|
||
For example, the previous update of [Black Box][1] was bundled with certain bugs, and I could not select text! Developers have solved this issue now, but until they did not, I downgraded that specific package to make things work.
|
||
|
||
So, if you want to downgrade a specific app installed as a Flatpak, you can follow this guide.
|
||
|
||
### Downgrade Flatpak packages in Linux
|
||
|
||
**Disclaimer:** Unlike installing Flatpaks, you need **sudo** privileges to downgrade Flatpak packages. And if your user doesn’t have them, you can follow our detailed guide on [how to give sudo access to users][2].
|
||
|
||
**Recommended Read**: [How to Apply GTK Themes on Flatpak Applications][3]
|
||
|
||
Here are the steps below:
|
||
|
||
#### 1. Get the Application ID of the Package
|
||
|
||
The first step is to find the Application ID of the package you want to downgrade. You can easily find it by listing the installed packages:
|
||
|
||
```
|
||
flatpak list --app
|
||
```
|
||
|
||
![find flatpak package id in linux][4]
|
||
|
||
Note down the application ID of the package you want to downgrade.
|
||
|
||
Here, I am going to downgrade the Black Box, so my application ID will be `com.raggesilver.BlackBox`.
|
||
|
||
#### 2. List previous releases and get the commit code
|
||
|
||
Once you get the application ID, you’d need to list the previous releases.
|
||
|
||
You can easily do this by following the given command syntax:
|
||
|
||
```
|
||
flatpak remote-info --log flathub <Application ID>
|
||
```
|
||
|
||
![find previous releases in flatpak][5]
|
||
|
||
Once you find the preferred previous release, copy the commit code as shown above.
|
||
|
||
#### 3. Downgrade the Flatpack package
|
||
|
||
Once you follow the first two steps, you should have the following:
|
||
|
||
- Application ID of the package.
|
||
- Commit code of preferred older release.
|
||
|
||
Now, you have to put them in the following command:
|
||
|
||
```
|
||
sudo flatpak update --commit=<commit_code> <Application ID>
|
||
```
|
||
|
||
As I’m downgrading Black Box to the previous release, I’ll be using the following command:
|
||
|
||
```
|
||
sudo flatpak update --commit=c4ef3f4be655cbe2559451a9ef5977ab28139c54bb5adbd7db812f3482bd0db5 com.raggesilver.BlackBox
|
||
```
|
||
|
||
![downgrade flatpak package in linux][6]
|
||
|
||
And that’s it!
|
||
|
||
To check whether you have successfully downgraded the package, you can list the packages that need to be updated (considering everything else is up-to-date). It should include the name of the package that you have recently downgraded:
|
||
|
||
```
|
||
flatpak update
|
||
```
|
||
|
||
![downgrade flatpak package][7]
|
||
|
||
And as you can see, the Black Box is outdated and needs to be updated, meaning the package has been downgraded successfully!
|
||
|
||
### Wrapping Up
|
||
|
||
In this quick tutorial, I explained how you downgrade Flatpak packages, and I hope you find this helpful.
|
||
|
||
And if you have any queries or suggestions, let me know in the comments.
|
||
|
||
--------------------------------------------------------------------------------
|
||
|
||
via: https://itsfoss.com/downgrade-flatpak-packages/
|
||
|
||
作者:[Sagar Sharma][a]
|
||
选题:[lkxed][b]
|
||
译者:[译者ID](https://github.com/译者ID)
|
||
校对:[校对者ID](https://github.com/校对者ID)
|
||
|
||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||
|
||
[a]: https://itsfoss.com/author/sagar/
|
||
[b]: https://github.com/lkxed
|
||
[1]: https://itsfoss.com/blackbox-terminal/
|
||
[2]: https://itsfoss.com/add-sudo-user-ubuntu/
|
||
[3]: https://itsfoss.com/flatpak-app-apply-theme/
|
||
[4]: https://itsfoss.com/wp-content/uploads/2022/12/find-flatpak-package-id-in-linux.png
|
||
[5]: https://itsfoss.com/wp-content/uploads/2022/12/find-previous-releases-in-flatpak-1.png
|
||
[6]: https://itsfoss.com/wp-content/uploads/2022/12/downgrade-flatpak-package-in-linux.png
|
||
[7]: https://itsfoss.com/wp-content/uploads/2022/12/downgrade-flatpak-package.png
|