-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?

Sandra
  • 10,303
  • 38
  • 112
  • 165

2 Answers2

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.

Sandra
  • 10,303
  • 38
  • 112
  • 165
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
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.

John
  • 9,070
  • 1
  • 29
  • 34
  • 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