-1

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?

2 Answers 2

4

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.

1

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.

1
  • 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, 2013 at 17:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .