From c6d319a018f2c0654665b470210bbc5705df69d8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 11 Oct 2022 08:37:21 +0800 Subject: [PATCH] translated --- ...Packages in Linux at Once With Topgrade.md | 149 ------------------ ...Packages in Linux at Once With Topgrade.md | 149 ++++++++++++++++++ 2 files changed, 149 insertions(+), 149 deletions(-) delete mode 100644 sources/tech/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md create mode 100644 translated/tech/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md diff --git a/sources/tech/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md b/sources/tech/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md deleted file mode 100644 index 9768d989b6..0000000000 --- a/sources/tech/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md +++ /dev/null @@ -1,149 +0,0 @@ -[#]: subject: "Upgrade Various Kinds of Packages in Linux at Once With Topgrade" -[#]: via: "https://itsfoss.com/topgrade/" -[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" -[#]: collector: "lkxed" -[#]: translator: "geekpi" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Upgrade Various Kinds of Packages in Linux at Once With Topgrade -====== -Updating a Linux system is not that complicated, is it? After all, to update Ubuntu like distros, you just have to use apt update && apt upgrade. - -That would have been the case if all the packages had been installed through a single package manager. - -But that’s not the case anymore. You have the classic apt/dnf/pacman and then come snap, flatpak, appimages. It doesn’t end here. You may also install applications using PIP (for Python) and Cargo (for Rust). - -Use node? The npm packages need to be updated separately. Oh My Zsh? Needs to be updated separately. [Plugins in Vim][1], Atom etc may also not be covered by apt/dnf/pacman. - -Do you see the problem now? And this is the kind of problem a new tool called topgrade aims to solve. - -### Topgrade: A single utility to take care of all kinds of updates - -This [topgrade][2] is a CLI utility and it detects which tools you use and then runs the appropriate commands to update them. - -![topgrade disable system][3] - -Apart from the usual Linux package managers, it can detect and update brew, cargo, PIP, pihole, Vim and Emacs plugins, R packages etc. You can see the list of supported packages on [its wiki page][4]. - -##### Key Features of Topgrade: - -* Ability to update packages from different package managers, including firmware! -* You do have control over how you want to update packages. -* Extremely customizable. -* Ability to have an overview even before updating packages. - -So without wasting any time, let’s jump to the installation. - -### Install Topgrade in Linux using Cargo - -The installation process is quite straightforward as I’m going to use the cargo package manager. - -We already have a [detailed guide with multiple methods for setting up a cargo package manager][5] So I’m going to make it quick by using Ubuntu in my example. - -So let’s start with some dependencies and installation of cargo in the least extensive way: - -``` -sudo apt install cargo libssl-dev pkg-config -``` - -Once the cargo has been installed, utilize the given command to install topgrade: - -``` -cargo install topgrade -``` - -And it will throw a warning as given: - -![cargo error][6] - -Where you just have to add the path of cargo to run binaries. This can be done through given command where you’ve to change `sagar` with your username: - -``` -echo 'export PATH=$PATH:/home/sagar/.cargo/bin' >> /home/sagar/.bashrc -``` - -Now, reboot your system and topgrade is ready to use. But wait, we need to install another package that will update cargo to get the most recent packages. - -``` -cargo install cargo-update -``` - -And we’re done with installation. - -### Using Topgrade - -Using topgrade is extremely easy. Use a single command and that’s it: - -``` -topgrade -``` - -![][7] - -But this won’t give you any control apart from system packages but as I mentioned, you can blacklist the repo that you don’t want to get updated. - -#### Exclude package managers and repositories from Topgrade - -Let’s suppose I want to exclude snaps and packages downloaded from the default package manager, so my command would be: - -``` -topgrade --disable snap system -``` - -![topgrade disable snap system][8] - -For making a permanent change, you’d have to make a few changes in its config file which can be accessed through the given command: - -``` -topgrade --edit-config -``` - -For this example, I discluded snaps and default system repo: - -![configuring topgrade][9] - -#### Dry run topgrade - -Having an estimation of outdated packages that will be updated is always a good idea and I find this most useful option from the entire catalog of topgrade. - -You just have to use topgrade with `-n` option and it will generate a summary of outdated packages. - -``` -topgrade -n -``` - -![summery of topgrade][10] - -A neat way of checking packages that need to be updated. - -### Final Words - -After using Topgrade for a few weeks, it became an integral part of my Linux arsenal. Like most other Linux users, I was only updating packages through my default package manager. Python and Rust packages were ignored completely. Thanks to topgrade, my system is updated completely now. - -I understand that this is not a tool everyone would want to use. What about you? Willing to give it a try? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/topgrade/ - -作者:[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://linuxhandbook.com/install-vim-plugins/ -[2]: https://github.com/r-darwish/topgrade -[3]: https://itsfoss.com/wp-content/uploads/2022/09/topgrade-disable-system.png -[4]: https://github.com/r-darwish/topgrade/wiki/Step-list -[5]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/ -[6]: https://itsfoss.com/wp-content/uploads/2022/09/cargo-error.png -[7]: https://itsfoss.com/wp-content/uploads/2022/10/topgrade.mp4 -[8]: https://itsfoss.com/wp-content/uploads/2022/09/topgrade-disable-snap-system.png -[9]: https://itsfoss.com/wp-content/uploads/2022/09/configuring-topgrade-1.png -[10]: https://itsfoss.com/wp-content/uploads/2022/09/summery-of-topgrade.png diff --git a/translated/tech/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md b/translated/tech/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md new file mode 100644 index 0000000000..ac5c634e60 --- /dev/null +++ b/translated/tech/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md @@ -0,0 +1,149 @@ +[#]: subject: "Upgrade Various Kinds of Packages in Linux at Once With Topgrade" +[#]: via: "https://itsfoss.com/topgrade/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +使用 Topgrade 一次升级 Linux 中的各种软件包 +====== +更新 Linux 系统并没有那么复杂,不是吗?毕竟,要像发行版一样更新 Ubuntu,你只需要使用 apt update 和 apt upgrade。 + +如果所有的包都是通过一个包管理器安装的,就会是这样。 + +但现在情况不再如此。你有经典的 apt/dnf/pacman,还有 snap、flatpak、appimages。不止于此,你还可以使用 PIP(用于 Python)和 Cargo(用于 Rust)安装应用。 + +使用 node? npm 包需要单独更新。Oh My Zsh?需要单独更新。[Vim 中的插件][1]、Atom 等也可能不被 apt/dnf/pacman 覆盖。 + +你现在看到问题了吗?这就是名为 topgrade 的新工具旨在解决的问题。 + +### Topgrade:处理各种更新的单一程序 + +[topgrade][2] 是一个 CLI 程序,它会检测你使用的工具,然后运行适当的命令来更新它们。 + +![topgrade disable system][3] + +除了通常的 Linux 包管理器,它还可以检测和更新 brew、cargo、PIP、pihole、Vim 和 Emacs 插件、R 软件包等。你可以在 [wiki 页面][4]上查看支持的包列表。 + +##### Topgrade 的主要特点: + +* 能够从不同的包管理器更新包,包括固件! +* 你可以控制更新包的方式。 +* 高度可定制。 +* 能够在更新包之前进行概览 + +所以不要浪费任何时间,让我们跳到安装。 + +### 使用 Cargo 在 Linux 中安装 Topgrade + +安装过程非常简单,因为我将使用 cargo 包管理器。 + +我们已经有了[详细指南,其中包含设置 cargo 包管理器的多种方法][5]。所以我将在我的示例中使用 Ubuntu 来快速完成。 + +因此,让我们以最少方式安装依赖项以及 cargo: + +``` +sudo apt install cargo libssl-dev pkg-config +``` + +安装 cargo 后,使用给定的命令安装 topgrade: + +``` +cargo install topgrade +``` + +它会抛出一个警告: + +![cargo error][6] + +你只需添加 cargo 路径即可运行二进制文件。这可以通过给定的命令来完成,你需要使用你的用户名替换 `sagar`: + +``` +echo 'export PATH=$PATH:/home/sagar/.cargo/bin' >> /home/sagar/.bashrc +``` + +现在,重启系统,topgrade 就可以使用了。但是等等,我们需要安装另一个包来更新 cargo 以获取最新的包。 + +``` +cargo install cargo-update +``` + +这样我们完成了安装。 + +### 使用 Topgrade + +使用 topgrade 非常简单。使用一个命令,就是这样: + +``` +topgrade +``` + +![][7] + +但这不会给你除了系统包之外的任何控制,但正如我所提到的,你可以将不想更新的仓库列入黑名单。 + +#### 从 Topgrade 中排除包管理器和仓库 + +假设我想排除 snap 和从默认包管理器下载的包,所以我的命令是: + +``` +topgrade --disable snap system +``` + +![topgrade disable snap system][8] + +要进行永久更改,你必须在其配置文件中进行一些更改,这些更改可以通过给定的命令访问: + +``` +topgrade --edit-config +``` + +对于此示例,我排除了 snap 和默认系统仓库: + +![configuring topgrade][9] + +#### 试运行 topgrade + +评估将要更新的过时软件包总是一个好主意,我从 topgrade 的整个目录中找到了这个最有用的选项。 + +你只需使用带有 `-n` 选项的 topgrade,它就会生成过期软件包的摘要。 + +``` +topgrade -n +``` + +![summery of topgrade][10] + +检查需要更新的软件包的一种简洁方法。 + +### 最后的话 + +在使用 Topgrade 几周后,它成为了我的 Linux 武器库中不可或缺的一部分。 像大多数其他 Linux 用户一样,我只是通过我的默认包管理器更新包。 Python 和 Rust 包被完全忽略了。 感谢 topgrade,我的系统现在完全更新了。 + +我知道这不是每个人都想使用的工具。 那你呢? 愿意试一试吗? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/topgrade/ + +作者:[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://linuxhandbook.com/install-vim-plugins/ +[2]: https://github.com/r-darwish/topgrade +[3]: https://itsfoss.com/wp-content/uploads/2022/09/topgrade-disable-system.png +[4]: https://github.com/r-darwish/topgrade/wiki/Step-list +[5]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/ +[6]: https://itsfoss.com/wp-content/uploads/2022/09/cargo-error.png +[7]: https://itsfoss.com/wp-content/uploads/2022/10/topgrade.mp4 +[8]: https://itsfoss.com/wp-content/uploads/2022/09/topgrade-disable-snap-system.png +[9]: https://itsfoss.com/wp-content/uploads/2022/09/configuring-topgrade-1.png +[10]: https://itsfoss.com/wp-content/uploads/2022/09/summery-of-topgrade.png