• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 536
  • Last Modified:

rpm query reports package listing twice: cleanup?


I just noticed  a mild irritant when doing some rpm queries. The system in
question is identified by

[mhavlice@xen01 ci_mhavlice]$ cat /etc/redhat-release
CentOS release 5.6 (Final)
[mhavlice@xen01 ci_mhavlice]$ rpm --version
RPM version
[mhavlice@xen01 ci_mhavlice]$

Some but not all packages are listed twice when running an rpm query.
For example:

[mhavlice@xen01 ci_mhavlice]$ rpm -qa | grep net-tools
[mhavlice@xen01 ci_mhavlice]$ rpm -qa | grep subversion
[mhavlice@xen01 ci_mhavlice]$

I am wondering if its possible to determine extraneous entries in the rpm database and
clean them out safely. Preferably without actually completely removing and reinstalling
the multi-listed package.

Thanks in Advance,

Michael E. Havlicek
2 Solutions
Peter KwanCommented:
mhavlicekAuthor Commented:
Responding to inactivity notification e-mail:

I think it is possible that I am encountering the scenario pertaining to 32-bit and 64-bit versions
of the package being present on the system in question (described in suggested solution link).
The install base is 64-bit for my system.

Haven't had a chance to further investigate. Will follow up.

I'd say it was the 32bit and 64bit packages being available on your system.

I know I have  both 32 and 64bit packages on some of my systems unfortunately I don't have access at the present time so get some example output.
Surely,you must be running 64-bit version of Centos,and both 32 and 64-bit versions are installed at your server. Now,from my server (where I remember I have such a situation):
[root@mail ~]# rpm -qa subversion
Looks like there are two identical packages,but if I dig further,to show not only rpm name and version, but also architecture,things get clear:
[root@mail ~]# rpm -q subversion --qf "%{name}-%{version}-%{release} %{arch}\n"
subversion-1.6.11-7.el5_6.3 x86_64
subversion-1.6.11-7.el5_6.3 i386
So these are packages for different bitnesses,and you may keep it in case some software requires specific arhitecture.
mhavlicekAuthor Commented:
The first answer pointed to a correct solution elsewhere so in and of itself it had no direct action
to solving the problem.

The second had the information to demonstrate what
was going on.

No direct answer was given say for a scripted query that reported all installed packages with both 64 and 32 bit versions installed.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now