How To List Installed Packages From A Certain Repository In Linux

We already know how to list the installed repositories in Unix-like operating systems. Today, let me show you how to list installed packages from a certain repository in Linux from command line. This can be useful when you wanted to know which packages are from which repositories.

List Installed Packages From A Certain Repository In Linux

Arch Linux

In Arch Linux and its derivatives such as Antergos, Manjaro Linux, run the following command to know the list of installed packages from a certain repository.

$ paclist community

The above command will list the installed packages from the community repository in Arch Linux.

Also, you can print the output in print-friendly format with awk command as shown below.

$ yumdb search from_repo epel* |awk -F"\n" '{ RS=""; print $1 }'

Here, epel is the REPOID. You can get the repoid by running the following command:

$ yum repolist

Reposquery is yet another command to list the installed packages from a certain repository in YUM based systems. Please note that you need to install yum-utils package in-order to use repoquery command.

To list the installed packages from EPEL repository using reposquery, just run:

And, that’s all for now. Hope you find this useful. I will be soon here with another interesting articles. Until then, stay tuned with OSTechNix. If you like our articles, please share them on your social, professional networks, so other users can also benefit from them.