How To List All Repository Packages With Yum Command

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/list-repository-packages-yum-command/
PINTEREST
PINTEREST
INSTAGRAM

I have added new repository into my repositories and I want to list all packages. Find total count of packages and filter some of packages I am interested. And now we can start the process.

List All Repository Packages

yum command have list option which will list all packages from currently available repositories. This will check all currently enabled repositories.

List All Repository Packages
List All Repository Packages

We have listed all packages. As we see first installed packages are listed . Installed packaged are listed as installed if 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 like el7 .

Filter Listed Packages

While listing packages we may need to specific packages. We will get the help of grep command while using yum list . We will grep packages which name have stack .

Filter Packages
Filter Packages
  • We provide | grep stack to filter packages which provide stack word

List Installed Packages

If we need only installed packages to list we need to provide the installed at the end of the yum list command like below.

List Installed Packages
List Installed Packages

Filter Installed Packages

If we want too list specific packages which is all ready installed in the current system we will use the grep command again. In this example we will list packages which names contains user .

Filter Installed Packages
Filter Installed Packages

List Package History

During the package operations all transactions are stored in the yum history. We can list this history with the history list command like below. Because this command may contains sensitive data we need to use root privileges if not we will get an error like Error: This command has to be run under the root user. .

List Package History
List Package History

List Group Packages

Distributions like CentOS, Fedora, RedHat provides group packages which contains multiple package to setup different environments. These environments can be development, XFCE etc. We can use grouplist in order to list this group packages.

LEARN MORE  How To Install Updates In Ubuntu, Debian, Mint, Kali

List Group Packages
List Group Packages

As we can see from screenshot that there is different packages like Environment Groups, Installed Environment Groups etc.

Filter Group Packages

In some cases we may need to filter listed group packages. We will again use grep command in order to filter listed group packages. In this example we will filter groups packages which name contains  Desktop in order to list desktop group packages.

Filter Group Packages
Filter Group Packages

Count Packages

We can count packages too. We can count total packages those starts with a like below. We will use wc command with the -l option.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/list-repository-packages-yum-command/
PINTEREST
PINTEREST
INSTAGRAM