From 139e5ccef834543cd4879670fb23157bc7adcd08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Thu, 22 Dec 2022 20:49:18 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][tech]:?= =?UTF-8?q?=2020221220.1=20=E2=AD=90=EF=B8=8F=20How=20to=20Downgrade=20Fla?= =?UTF-8?q?tpak=20Packages=20in=20Linux.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ... How to Downgrade Flatpak Packages in Linux.md | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 sources/tech/20221220.1 ⭐️ How to Downgrade Flatpak Packages in Linux.md diff --git a/sources/tech/20221220.1 ⭐️ How to Downgrade Flatpak Packages in Linux.md b/sources/tech/20221220.1 ⭐️ How to Downgrade Flatpak Packages in Linux.md new file mode 100644 index 0000000000..1d664feba4 --- /dev/null +++ b/sources/tech/20221220.1 ⭐️ How to Downgrade Flatpak Packages in Linux.md @@ -0,0 +1,115 @@ +[#]: 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: " " +[#]: 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 +``` + +![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= +``` + +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