translated

This commit is contained in:
geekpi 2022-12-29 09:31:23 +08:00
parent 49091c74f3
commit 7a14a46d14
2 changed files with 112 additions and 115 deletions

View File

@ -1,115 +0,0 @@
[#]: 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 doesnt 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, youd 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 Im downgrading Black Box to the previous release, Ill be using the following command:
```
sudo flatpak update --commit=c4ef3f4be655cbe2559451a9ef5977ab28139c54bb5adbd7db812f3482bd0db5 com.raggesilver.BlackBox
```
![downgrade flatpak package in linux][6]
And thats 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

View File

@ -0,0 +1,112 @@
[#]: 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: " "
如何在 Linux 中降级 Flatpak 软件包
======
从技术上讲,次要更新是为了解决问题。但是,当某些更新破坏你当前的工作流程时,情况可能会变得更糟。
无论是 Flatpak 包还是 Snap当出现问题时一切都会在某个时候崩溃。作为一个沙盒打包方案它可能不会影响整个系统但如果你遇到一个让你的应用体验变差的 bug你可能会后悔更新。
比如之前更新的 [Black Box][1] 就带来了一些 bug无法选择文字开发人员现在已经解决了这个问题但在他们没有解决之前我降级了那个特定的包以使其正常工作。
所以,如果你想降级特定的 Flatpak 应用,你可以按照本指南进行操作。
### 在 Linux 中降级 Flatpak 包
**免责声明:** 与安装 Flatpaks 不同,你需要 **sudo** 权限才能降级 Flatpak 包。如果你的用户没有它们,你可以按照我们关于[如何向用户授予 sudo 访问权限][2]的详细指南进行操作。
以下是步骤:
#### 1.获取包的应用 ID
第一步是找到要降级的包的应用 ID。你可以列出已安装的软件包轻松找到它
```
flatpak list --app
```
![find flatpak package id in linux][4]
记下要降级的包的应用 ID。
这里,我要降级 Black Box所以我的应用 ID 将是 `com.raggesilver.BlackBox`
#### 2.列出以前的版本并获取提交代码
获得应用 ID 后,你需要列出以前的版本。
你可以按照给定的命令语法做到这点:
```
flatpak remote-info --log flathub <Application ID>
```
![find previous releases in flatpak][5]
找到首选的先前版本后,复制如上所示的提交代码。
#### 3.降级 Flatpack 包
执行前两个步骤后,你应该有以下内容:
- 包的应用 ID。
- 首选旧版本的提交代码。
现在,你必须将它们放在以下命令中:
```
sudo flatpak update --commit=<commit_code> <Application ID>
```
当我将 Black Box 降级到以前的版本时,我将使用以下命令:
```
sudo flatpak update --commit=c4ef3f4be655cbe2559451a9ef5977ab28139c54bb5adbd7db812f3482bd0db5 com.raggesilver.BlackBox
```
![downgrade flatpak package in linux][6]
这就完成了!
要检查你是否已成功降级软件包,你可以列出需要更新的软件包(考虑到其他所有内容都是最新的)。它应该包括你最近降级的软件包的名称:
```
flatpak update
```
![downgrade flatpak package][7]
如你所见Black Box 已过时,需要更新,这意味着包已成功降级!
### 总结
在本快速教程中,我解释了如何降级 Flatpak 软件包,希望对你有所帮助。
如果你有任何疑问或建议,请在评论中告诉我。
--------------------------------------------------------------------------------
via: https://itsfoss.com/downgrade-flatpak-packages/
作者:[Sagar Sharma][a]
选题:[lkxed][b]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者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/
[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