Re: purging duplicate rpm versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In regard to: purging duplicate rpm versions, oscaruser@xxxxxxxxxxxxxx said...:

Folks,

An installed rpm is being listed multiple (three) times, with different version numbers. How can I remove the older versions, but keep the latest intact? I have tried to rebuild the rpm database, and various erase/force commands, but no good.

If you're certain that there's just one actual copy of the RPM contents on
your system, then what you're really after is removing the extra entries
from the RPM database.  You can do that with

        rpm --justdb --erase custom-cron-base-0.1-2010022500

Also, one potential reason why the database lists multiple copies
installed is that it appears your %postun script is failing.  When that
happens, it will probably leave the package listed in your RPM database.
If you don't fix that problem, you'll probably be back in this situation
again after the next upgrade.

Tim

[osc@cron1 ~]$ sudo rpm --rebuilddb
[osc@cron1 ~]$ rpm -q custom-cron-base
custom-cron-base-0.1-2010050700.amd64
custom-cron-base-0.1-2010022300.amd64
custom-cron-base-0.1-2010022500.amd64
[osc@cron1 ~]$ sudo rpm -e --force custom-cron-base-0.1-2010022500.amd64
rpm: only installation, upgrading, rmsource and rmspec may be forced
[osc@cron1 ~]$ sudo rpm -e custom-cron-base-0.1-2010022500.amd64
remove_cron_job: not found
error: %postun(custom-cron-base-0.1-2010022500.amd64) scriptlet failed, exit status 127
[osc@cron1 ~]$ rpm -q custom-cron-base
custom-cron-base-0.1-2010050700.amd64
custom-cron-base-0.1-2010022300.amd64
custom-cron-base-0.1-2010022500.amd64
[osc@cron1 ~]$ sudo rpm -ev --nodeps custom-cron-base-0.1-2010022500.amd64
Wrote: /var/local/spool/repackage/1276790829/custom-cron-base-0.1-2010022500.amd
64.rpm
remove_cron_job: not found
error: %postun(custom-cron-base-0.1-2010022500.amd64) scriptlet failed, exit status 127
[osc@cron1 ~]$ rpm -q custom-cron-base
custom-cron-base-0.1-2010050700.amd64
custom-cron-base-0.1-2010022300.amd64
custom-cron-base-0.1-2010022500.amd64
[osc@cron1 ~]$ rpm -ql custom-cron-base-0.1-2010022500.amd64
/var/ee
/var/ee/cron
/var/ee/cron/cron_log_archiver.pl
/var/ee/cron/daemonControl.pl
/var/ee/cron/global.properties
/var/ee/java
/var/ee/java/lib
/var/ee/java/lib/j2ee-1.3_02.jar
/var/ee/java/lib/lucene-core-2.4.jar
[osc@cron1 ~]$ rpm -ql custom-cron-base-0.1-2010050700.amd64
/var/ee
/var/ee/cron
/var/ee/cron/cron_log_archiver.pl
/var/ee/cron/daemonControl.pl
/var/ee/cron/global.properties
/var/ee/java
/var/ee/java/lib
/var/ee/java/lib/j2ee-1.3_02.jar
/var/ee/java/lib/log4j-1.2.15.jar
/var/ee/java/lib/lucene-core-2.4.jar
/var/ee/java/lib/mime-util-2.1.3-custom.jar
/var/ee/java/lib/poi-3.6-20091214.jar
/var/ee/java/lib/serializer.jar
/var/ee/java/lib/slf4j-api-1.5.11.jar
/var/ee/java/lib/slf4j-log4j12-1.5.11.jar
/var/ee/java/lib/xalan.jar
[osc@cron1 ~]$ rpm -q custom-cron-base
custom-cron-base-0.1-2010050700.amd64
custom-cron-base-0.1-2010022300.amd64
custom-cron-base-0.1-2010022500.amd64
[osc@cron1 ~]$ sudo rpm -Fvh /release/custom-cron-base-0.1-2010050700.amd64.rpm
[osc@cron1 ~]$ rpm -q custom-cron-base
custom-cron-base-0.1-2010050700.amd64
custom-cron-base-0.1-2010022300.amd64
custom-cron-base-0.1-2010022500.amd64
[osc@cron1 ~]$ sudo rpm -vU --oldpackage /release/custom-cron-base-0.1-2010050700.amd64.rpm
Preparing packages for installation...
error: Install/Erase problems:
  package custom-cron-base-0.1-2010050700.amd64 is already installed
[osc@cron1 ~]$ rpm -ql custom-cron-base-0.1-2010050700.amd64
/var/ee
/var/ee/cron
/var/ee/cron/cron_log_archiver.pl
/var/ee/cron/daemonControl.pl
/var/ee/cron/global.properties
/var/ee/java
/var/ee/java/lib
/var/ee/java/lib/j2ee-1.3_02.jar
/var/ee/java/lib/log4j-1.2.15.jar
/var/ee/java/lib/lucene-core-2.4.jar
/var/ee/java/lib/mime-util-2.1.3-custom.jar
/var/ee/java/lib/poi-3.6-20091214.jar
/var/ee/java/lib/serializer.jar
/var/ee/java/lib/slf4j-api-1.5.11.jar
/var/ee/java/lib/slf4j-log4j12-1.5.11.jar
/var/ee/java/lib/xalan.jar
[osc@cron1 ~]$ rpm -ql custom-cron-base-0.1-2010050700.amd64
/var/ee
/var/ee/cron
/var/ee/cron/cron_log_archiver.pl
/var/ee/cron/daemonControl.pl
/var/ee/cron/global.properties
/var/ee/java
/var/ee/java/lib
/var/ee/java/lib/j2ee-1.3_02.jar
/var/ee/java/lib/log4j-1.2.15.jar
/var/ee/java/lib/lucene-core-2.4.jar
/var/ee/java/lib/mime-util-2.1.3-custom.jar
/var/ee/java/lib/poi-3.6-20091214.jar
/var/ee/java/lib/serializer.jar
/var/ee/java/lib/slf4j-api-1.5.11.jar
/var/ee/java/lib/slf4j-log4j12-1.5.11.jar
/var/ee/java/lib/xalan.jar
[osc@cron1 ~]$ rpm -q custom-cron-base
custom-cron-base-0.1-2010050700.amd64
custom-cron-base-0.1-2010022300.amd64
custom-cron-base-0.1-2010022500.amd64
[osc@cron1 ~]$
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list


--
Tim Mooney                                             Tim.Mooney@xxxxxxxx
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, IACC Building                             701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux