rpm query reports package listing twice: cleanup?

Posted on 2011-05-11
Last Modified: 2013-12-06

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
Question by:mhavlicek
    LVL 16

    Assisted Solution

    by:Peter Kwan

    Author Comment

    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.

    LVL 19

    Expert Comment

    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.
    LVL 4

    Accepted Solution

    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.

    Author Closing Comment

    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

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    In order for businesses to be compliant with certain information security laws in some countries, you need to be able to prove that a user (which user it was becomes important to the business to take action against the user after an event has occurr…
    The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now