How to list current version...

I have two opensuse 10.3 systems and I would like to compare the
installed packages. What command could I use to list the installed
packages. Then I can sort them and compare them.

Hi
Pipe the output from rpm to a file and then use diff to compare;


rpm -qa > machine1.txt
rpm -qa > machine2.txt
diff machine1.txt machine2.txt


Cheers Malcolm °¿° (Linux Counter #276890)
SLED 10.0 SP2 x86_64 Kernel 2.6.16.60-0.33-smp
up 1 day 21:33, 1 user, load average: 0.97, 1.09, 0.85
GPU GeForce 8600 GTS Silent - Driver Version: 177.82

Same idea but I do it sometimes and I can suggest some improvements:


rpm -qa | sort > machine1.txt
ssh machine2 rpm -qa | sort > machine2.txt
comm -3 machine[12].txt

This ensures that the outputs are sorted, and displays only the differences, both ways.

On Thu, 2008-12-11 at 19:37 +0000, Ted Miglautsch wrote:
> I have two opensuse 10.3 systems and I would like to compare the
> installed packages. What command could I use to list the installed
> packages. Then I can sort them and compare them.

/bin/rpm -qa --queryformat
"%{NAME} %{VERSION} %{RELEASE} %{ARCH} %{SUMMARY}
"

Using tabs as a separator you can then easily use sort (etc).

Also… I included ARCH, because it IS possible that two
machines may have the same version BUT different architectures
(remove ARCH if comparing intentionally between very different
architectures). An example is when you have a 64bit capable
x86… someone might install 32bit versions of some packages.