repoquery command examples

repoquery command examples

repoquery – query information from Yum repositories

List all packages whose name contains ‘perl’:

#repoquery '*perl*'

List all packages depending on openssl:

#repoquery --whatrequires openssl

List all package names and the repository they come from, nicely formatted:

#repoquery -a --qf "%-20{repoid} %{name}"

List name and summary of all available updates (if any), nicely formatted:

#repoquery -a --pkgnarrow=updates --qf "%{name}:\n%{summary}\n"

List optional packages in base group:

#repoquery -g --grouppkgs=optional -l base

List build requirements from ‘anaconda’ source rpm:

#repoquery --requires anaconda.src

List packages which BuildRequire gail-devel

#repoquery --archlist=src --whatrequires gail-devel

NB: This command will only work if you have repositories enabled which include srpms.


Leave a Reply

Your email address will not be published. Required fields are marked *