Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to find the vmware packages that I haven't installed from their repo.

The problem is that the output of yum search vmware is not the same format at from rpm -qa|grep vmware.

Question

How Can I make a diff of the installed and available rpm packages?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

You need repoquery. It is in the yum-utils package.

repoquery 'vmware*'

shows all available packages named beginning with vmware.

repoquery --pkgnarrow=installed 'vmware*'

shows installed packages named beginning with vmware.

It is trivial to then compare the output of these commands.

share|improve this answer

To get the package format the same, you can simply pass a format specifier to rpm. Example: rpm -qa --queryformat "${NAME}-${ARCH}\n" | grep vmware. To get to your end goal, I would run that through sort and save it to a file, then save yum search vmware | awk -F: '{print $1}' to another file and run diff against them. There are probably other (better) ways of running that awk command, as well.

share|improve this answer
    
Ok, so the awk against yum search isn't working as well as I expected on my system... this will get you started, but probably won't get you where you need to be. –  John Dec 10 '13 at 17:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.