I keep getting answers like:
yum list installed | grep bind
or
rpm -qa | grep bind
But that is not accurate as I'm getting a list of few other bind packages like these:
bind-utils-9.8.2-0.17.rc1.el6_4.5.x86_64
rpcbind-0.2.0-11.el6.x86_64
bind-libs-9.8.2-0.17.rc1.el6_4.5.x86_64
samba-winbind-3.6.9-151.el6.x86_64
samba-winbind-clients-3.6.9-151.el6.x86_64
ypbind-1.20.4-30.el6.x86_64
That is not I wanted. Instead I would want to accurately check if bind core package has been installed. Eg. bind.x86_64 32:9.8.2-0.17.rc1.el6_4.6
I was hoping for something like:
yum check installed bind
But hopefully someone could shed the light.
Error: No matching Packages to listand$?returns 1, and when I triedyum list installed bind-libs,$?returns 0. Which should be correct so far. Can I safely conclude your command is accurately determine a package is installed? I did find outrpm -q bindjust now. It it equavalent to your command also? – checksum Dec 03 '13 at 15:32yum list installed bind*– Alex Angelico Feb 14 '17 at 12:39rpm -q bindsolution shown in John's answer. I don't think it's an optimal solution if it involves connecting to yum repos just to see what is installed locally. – Noah Sussman Jan 24 '18 at 15:35yum -C list installed bindto avoid network. This keeps all the plugins enabled (just in case you have anything exotic that affects lookups in yumdb) and also tells you the repo the package was installed from – plasmid87 Jan 24 '18 at 21:47yum -Cand that does change how I think about this problem. Thank you! – Noah Sussman May 01 '18 at 15:17