We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies.
Customize Consent Preferences
We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.
The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ...
Always Active
Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.
No cookies to display.
Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.
No cookies to display.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.
No cookies to display.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
No cookies to display.
Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.
List All Packages Installed by a Specific Repo in CentOS / RedHat with YUM
Red Hat Enterprise Linux (RHEL), Fedora, CentOS and Scientific Linux allows administrators to add and enable multiple repositories (repos) to install software packages that are not included in the default base and updates repositories. Over time, the software packages that are installed can grow to quite a big list, and thus it’s nearly impossible to remember the source repo of all install packaged, especially when a package is available from multiple repos.
Here’s a few ways which you can use to find out the repo which installed the software package.
Yum List Installed
“list yum installed” is a popular command to list all installed packages on the system. In the newer version of YUM, the repository which installed the package is listed together. Some repos also append a unique “repo” tag to the release. With this info, we can grep all packages installed by a particular repo:
yum list installed | grep package_name
Or,
yum list installed | grep repo_name
For example, to look for all packages installed by EPEL repo:
yum list installed | grep epel
You can also specify the name of the package to search for instead of repo name.
The downsize of this method is that packages from other repos may also be listed if they have something that matches the string of repo been search. For example, command above returns packages from extras repo, which we installed the epel-release package, and from Software Collection repo, which has “epel” string in their release.
In addition, this method also does not work if the repo that you want to search for does not have any distinctive or unique characteristics, or does not display itself in the listing.
Yumdb Search From_Repo
The foolproof way to get information about the repo which installed a given package is by using yumdb, which saves all information when the package was installed.
Similar to “yum list installed”, “find-repos-of-install” command lists all the installed packages with their source repo. You need to pipe to grep to get information on a particular repo or package of your interest. And similarly, it may return unneeded repo or package which contains the same keyword.
find-repos-of-install | grep package_name
Or,
find-repos-of-install | grep repo_name
To use “find-repos-of-install”, you need to have yum-utils package installed.
RepoQuery
Another utility which can be used to identify the repo which responsible to install a package is “repoquery”, with the help of “grep”:
repoquery -a --qf "%-20{repoid} %{name}" | grep package_name
Or,
repoquery -a --qf "%-20{repoid} %{name}" | grep repo_name
Repoquery lists all packages available from enabled repositories. So you may need to spend more time to find out what you want from a long list of output. And it may also return unneeded repo or package which contains the same keyword.
To use “repoquery”, you need to have yum-utils package installed.
LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.Connect with LK through Tech Journey on Facebook, Twitter or Google+.