mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
translated
This commit is contained in:
parent
20ea8672bf
commit
d28829db92
@ -1,127 +0,0 @@
|
|||||||
[#]: subject: "How to Update Flatpak Packages in Linux"
|
|
||||||
[#]: via: "https://itsfoss.com/update-flatpak/"
|
|
||||||
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
|
|
||||||
[#]: collector: "lkxed"
|
|
||||||
[#]: translator: "geekpi"
|
|
||||||
[#]: reviewer: " "
|
|
||||||
[#]: publisher: " "
|
|
||||||
[#]: url: " "
|
|
||||||
|
|
||||||
How to Update Flatpak Packages in Linux
|
|
||||||
======
|
|
||||||
|
|
||||||
I believe almost all Linux users keep their systems updated.
|
|
||||||
|
|
||||||
But that update is usually for the default [package manager][1]. For example, [updating Ubuntu][2] often means updating all the APT packages.
|
|
||||||
|
|
||||||
However, there are other packaging formats like Snap and Flatpak. The Snap applications get updated automatically but not the Flatpak ones.
|
|
||||||
|
|
||||||
How do you update the Flatpak packages then? Well, you can update all the installed and updatable Flatpak packages using this command:
|
|
||||||
|
|
||||||
```
|
|
||||||
flatpak update
|
|
||||||
```
|
|
||||||
|
|
||||||
That’s quite simple. But let me discuss a few more things about updating Flatpak, such as:
|
|
||||||
|
|
||||||
- Updating all or specific Flatpak packages
|
|
||||||
- Updating Flatpak packages via Software Center
|
|
||||||
|
|
||||||
Let’s start with the terminal method first.
|
|
||||||
|
|
||||||
### Method 1: Using the terminal for updating Flatpak packages
|
|
||||||
|
|
||||||
Let me first start with the most practical approach that you should also begin with.
|
|
||||||
|
|
||||||
#### Update every outdated Flatpak package
|
|
||||||
|
|
||||||
Updating the whole catalog of existing flatpak packages is quite easy.
|
|
||||||
|
|
||||||
Enter the given command, and it will get you the list of outdated packages:
|
|
||||||
|
|
||||||
```
|
|
||||||
flatpak update
|
|
||||||
```
|
|
||||||
|
|
||||||
![3. update flatpak packages in linux][3]
|
|
||||||
|
|
||||||
You just have to enter “Y” and press the Enter key, which will take care of every update.
|
|
||||||
|
|
||||||
#### Updating specific Flatpak package
|
|
||||||
|
|
||||||
To update specific packages, you’d need the list of the packages that can be updated. You used the same command you saw earlier.
|
|
||||||
|
|
||||||
```
|
|
||||||
flatpak update
|
|
||||||
```
|
|
||||||
|
|
||||||
![3. update flatpak packages in linux][4]
|
|
||||||
|
|
||||||
Copy the name of the package you want to update from the output. Use the package name in the following fashion:
|
|
||||||
|
|
||||||
```
|
|
||||||
flatpak update package_name
|
|
||||||
```
|
|
||||||
|
|
||||||
For example, if you want to update Telegram, the following command will get the job done:
|
|
||||||
|
|
||||||
```
|
|
||||||
flatpak update org.telegram.desktop
|
|
||||||
```
|
|
||||||
|
|
||||||
![4. update specific package in flatpak][5]
|
|
||||||
|
|
||||||
That’s it!
|
|
||||||
|
|
||||||
### Method 2: Update Flatpak applications from the software center
|
|
||||||
|
|
||||||
Distributions that come up with Flatpak buil-in support provide updates to Flatpak applications in the software center. Fedora and Linux Mint are such distributions.
|
|
||||||
|
|
||||||
But if you are using Ubuntu, you’d need to add flatpak support to the GNOME software center:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt install gnome-software-plugin-flatpak
|
|
||||||
```
|
|
||||||
|
|
||||||
Once done, you will have two software centers in Ubuntu. That’s because the default software center is not GNOME’s but Snap Store.
|
|
||||||
|
|
||||||
Open this new software center from the system menu:
|
|
||||||
|
|
||||||
![1. open software center in ubuntu][6]
|
|
||||||
|
|
||||||
Go to the `Updates` section and you will find the list of outdated packages. This includes both APT and Flatpak packages.
|
|
||||||
|
|
||||||
![2. update flatpak from software center][7]
|
|
||||||
|
|
||||||
From here, you can update all the packages at once, or you can be selective with what to update.
|
|
||||||
|
|
||||||
### Wrapping Up
|
|
||||||
|
|
||||||
Many Linux desktop users tend to forget to update the Flatpak packages as they are not included in the regular system updates.
|
|
||||||
|
|
||||||
As Flatpak is a sandboxed packaging solution, you may not face any issues related to outdated packages, but you will miss out on new features and fixes for sure.
|
|
||||||
|
|
||||||
This is why I recommend running the Flatpak update command once ever few weeks.
|
|
||||||
|
|
||||||
I hope you like this quick little Flatpak tip helpful.
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/update-flatpak/
|
|
||||||
|
|
||||||
作者:[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/package-manager/
|
|
||||||
[2]: https://itsfoss.com/update-ubuntu/
|
|
||||||
[3]: https://itsfoss.com/wp-content/uploads/2022/12/3.-update-flatpak-packages-in-linux.png
|
|
||||||
[4]: https://itsfoss.com/wp-content/uploads/2022/12/3.-update-flatpak-packages-in-linux.png
|
|
||||||
[5]: https://itsfoss.com/wp-content/uploads/2022/12/4.-update-specific-package-in-flatpak.png
|
|
||||||
[6]: https://itsfoss.com/wp-content/uploads/2022/12/1.-open-software-center-in-ubuntu.png
|
|
||||||
[7]: https://itsfoss.com/wp-content/uploads/2022/12/2.-update-flatpak-from-software-center.png
|
|
@ -0,0 +1,127 @@
|
|||||||
|
[#]: subject: "How to Update Flatpak Packages in Linux"
|
||||||
|
[#]: via: "https://itsfoss.com/update-flatpak/"
|
||||||
|
[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/"
|
||||||
|
[#]: collector: "lkxed"
|
||||||
|
[#]: translator: "geekpi"
|
||||||
|
[#]: reviewer: " "
|
||||||
|
[#]: publisher: " "
|
||||||
|
[#]: url: " "
|
||||||
|
|
||||||
|
如何在 Linux 中更新 Flatpak 软件包
|
||||||
|
======
|
||||||
|
|
||||||
|
我相信几乎所有的 Linux 用户都会保持他们系统的更新。
|
||||||
|
|
||||||
|
但这种更新通常是针对默认的[包管理器][1]。例如,[更新 Ubuntu][2] 往往意味着更新所有的 APT 软件包。
|
||||||
|
|
||||||
|
然而,还有其他的打包格式,如 Snap 和 Flatpak。Snap 应用程序会自动更新,但 Flatpak 的不会。
|
||||||
|
|
||||||
|
那么你如何更新 Flatpak 软件包呢?好吧,你可以用这个命令来更新所有已安装和可更新的 Flatpak 包:
|
||||||
|
|
||||||
|
```
|
||||||
|
flatpak update
|
||||||
|
```
|
||||||
|
|
||||||
|
这很简单。但让我再讨论一下关于更新 Flatpak 的一些事情,比如说:
|
||||||
|
|
||||||
|
- 更新所有或特定的 Flatpak 包
|
||||||
|
- 通过软件中心更新 Flatpak 包
|
||||||
|
|
||||||
|
让我们先从终端的方法开始。
|
||||||
|
|
||||||
|
### 方法 1:使用终端来更新 Flatpak 包
|
||||||
|
|
||||||
|
首先让我从最实用的方法开始,你也应该从这个方法开始。
|
||||||
|
|
||||||
|
#### 更新每一个过时的 Flatpak 包
|
||||||
|
|
||||||
|
更新现有的 Flatpak 包的整个目录是很容易的。
|
||||||
|
|
||||||
|
输入给定的命令,就可以得到过期包的列表:
|
||||||
|
|
||||||
|
```
|
||||||
|
flatpak update
|
||||||
|
```
|
||||||
|
|
||||||
|
![3. update flatpak packages in linux][3]
|
||||||
|
|
||||||
|
你只需输入 “Y” 并按下回车键,就能搞定每一个更新。
|
||||||
|
|
||||||
|
#### 更新特定的 Flatpak 包
|
||||||
|
|
||||||
|
要更新特定的软件包,你需要可以更新的软件包的列表。你用的是你之前看到的那个命令。
|
||||||
|
|
||||||
|
```
|
||||||
|
flatpak update
|
||||||
|
```
|
||||||
|
|
||||||
|
![3. update flatpak packages in linux][4]
|
||||||
|
|
||||||
|
从输出中复制你要更新的软件包的名称。在以下命令中使用软件包的名称:
|
||||||
|
|
||||||
|
```
|
||||||
|
flatpak update package_name
|
||||||
|
```
|
||||||
|
|
||||||
|
例如,如果你想更新Telegram,下面的命令可以完成这项工作:
|
||||||
|
|
||||||
|
```
|
||||||
|
flatpak update org.telegram.desktop
|
||||||
|
```
|
||||||
|
|
||||||
|
![4. update specific package in flatpak][5]
|
||||||
|
|
||||||
|
这就完成了
|
||||||
|
|
||||||
|
### 方法 2:从软件中心更新 Flatpak 应用
|
||||||
|
|
||||||
|
有 Flatpak 内置支持的发行版会在软件中心提供 Flatpak 应用的更新。Fedora 和 Linux Mint 就是这样的发行版。
|
||||||
|
|
||||||
|
但如果你使用的是 Ubuntu,你就需要在 GNOME 软件中心添加 Flatpak 支持:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install gnome-software-plugin-flatpak
|
||||||
|
```
|
||||||
|
|
||||||
|
完成后,你将在 Ubuntu 中拥有两个软件中心。这是因为默认的软件中心不是 GNOME 的,而是 Snap Store。
|
||||||
|
|
||||||
|
从系统菜单中打开这个新的软件中心:
|
||||||
|
|
||||||
|
![1. open software center in ubuntu][6]
|
||||||
|
|
||||||
|
进入`更新`页面,你会发现过时的软件包列表。这包括 APT 和 Flatpak 软件包。
|
||||||
|
|
||||||
|
![2. update flatpak from software center][7]
|
||||||
|
|
||||||
|
在这里,你可以一次更新所有的软件包,或者你可以有选择地更新什么。
|
||||||
|
|
||||||
|
### 总结
|
||||||
|
|
||||||
|
许多 Linux 桌面用户往往忘记更新 Flatpak 软件包,因为它们不包括在定期的系统更新中。
|
||||||
|
|
||||||
|
由于 Flatpak 是一个沙盒式的打包解决方案,你可能不会面临任何与过时的软件包有关的问题,但你肯定会错过新的功能和修复。
|
||||||
|
|
||||||
|
这就是为什么我建议每隔几周运行一次 Flatpak 更新命令。
|
||||||
|
|
||||||
|
我希望你喜欢这个快速的 Flatpak 小技巧。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/update-flatpak/
|
||||||
|
|
||||||
|
作者:[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/package-manager/
|
||||||
|
[2]: https://itsfoss.com/update-ubuntu/
|
||||||
|
[3]: https://itsfoss.com/wp-content/uploads/2022/12/3.-update-flatpak-packages-in-linux.png
|
||||||
|
[4]: https://itsfoss.com/wp-content/uploads/2022/12/3.-update-flatpak-packages-in-linux.png
|
||||||
|
[5]: https://itsfoss.com/wp-content/uploads/2022/12/4.-update-specific-package-in-flatpak.png
|
||||||
|
[6]: https://itsfoss.com/wp-content/uploads/2022/12/1.-open-software-center-in-ubuntu.png
|
||||||
|
[7]: https://itsfoss.com/wp-content/uploads/2022/12/2.-update-flatpak-from-software-center.png
|
Loading…
Reference in New Issue
Block a user