yum 列出软件包版本
I have added a new repository into my repositories and I want to list all packages. Find the total count of packages and filter some of the packages I am interested in. And now we can start the process.
我已经在我的存储库中添加了一个新的存储库,并且我想列出所有软件包。 查找软件包总数,并过滤一些我感兴趣的软件包。现在我们可以开始该过程。
列出所有存储库软件包 (List All Repository Packages)
yum
command havelist
option which will list all packages from currently available repositories. This will check all currently enabled repositories.
yum
命令具有list
选项,它将列出当前可用存储库中的所有软件包。 这将检查所有当前启用的存储库。
$ yum list
We have listed all packages. As we see first installed packages are listed . Installed packaged are listed asinstalledif the packages are not installed their repository is written like@base. We can see that there is also package versions which will print current package version with the repository version likeel7
.
我们已列出所有软件包。 如我们所见,首先列出了已安装的软件包。 如果未安装软件包,则已安装的软件包将列为已安装。它们的存储库写为@base。 我们可以看到还有一些软件包版本,这些版本将使用存储库版本(如el7
打印当前软件包版本。
筛选列出的包裹 (Filter Listed Packages)
While listing packages we may need to specific packages. We will get the help of grep command while usingyum list
. We will grep packages which name havestack
.
在列出软件包时,我们可能需要特定的软件包。 使用yum list
我们将获得grep命令的帮助。 我们将使用名称为stack
grep软件包。
$ yum list | grep stack