View Full Version : How to delete demaged package?
Botond
24th February 2006, 09:43 PM
Hi, I've accidentally deleted files of the kernel-devel-2.6.15-1.1948_FC5 package. That wouldn't be a problem, I don't need the old kernel anymore. However RPM still thinks that the package is there but when I try to delete it with "rpm -e" rpm goes mad: it consumes 100% CPU of the time but it doesn't do anything for minutes. Do you have an idea how to get rid of the old kernel-devel-2.6.15-1.1948_FC5 package?
moonhyunjin
24th February 2006, 10:14 PM
did you try "rpm -ev" command with option "--force"?
Botond
24th February 2006, 11:21 PM
Unfortunately --force is invalid with rpm -e.
As a test I've installed and deleted cinelerra-2.0-1.i386.rpm. "rpm -e -vv cinelerra" gave this:
# rpm -e -vv cinelerra
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Name rdonly mode=0x0
D: read h# 3157 Header SHA1 digest: OK (b3473924bf10dd45dda648fc18e2988c6dcfbae4)
D: ========== --- cinelerra-2.0-1 i386/linux 0x1
D: opening db index /var/lib/rpm/Requirename rdonly mode=0x0
D: ========== recording tsort relations
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth)
D: 0 0 0 0 1 0 -cinelerra-2.0-1.i386
D: closed db index /var/lib/rpm/Requirename
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages create mode=0x42
D: mounted filesystems:
D: i dev bsize bavail iavail mount point
D: 0 0x00000700 4096 2852671 1867253 /
D: 1 0x00000003 4096 0 -1 /proc
D: 2 0x00000000 4096 0 -1 /sys
D: 3 0x0000000a 4096 0 -1 /dev/pts
D: 4 0x00000012 4096 80735 80734 /dev/shm
D: 5 0x00000301 4096 875887 10041750 /mnt/hda1
D: 6 0x00000013 4096 0 -1 /proc/sys/fs/binfmt_misc
D: 7 0x00000014 4096 0 -1 /net
D: sanity checking 1 elements
D: running pre-transaction scripts
D: computing 152 file fingerprints
D: computing file dispositions
D: opening db index /var/lib/rpm/Basenames create mode=0x42
D: ========== --- cinelerra-2.0-1 i386-linux 0x1
D: erase: cinelerra-2.0-1 has 152 files, test = 0
D: opening db index /var/lib/rpm/Name create mode=0x42
D: read h# 3157 Header SHA1 digest: OK (b3473924bf10dd45dda648fc18e2988c6dcfbae4)
D: opening db index /var/lib/rpm/Triggername create mode=0x42
D: fini 100644 1 ( 0, 0) 63291 /usr/share/locale/sl/LC_MESSAGES/cinelerra.mo
D: fini 100644 1 ( 0, 0) 22693 /usr/share/locale/nb/LC_MESSAGES/cinelerra.mo
...
(deleting of files continued)
...
D: fini 100755 1 ( 0, 0) 180700 /usr/bin/mpeg3cat
D: fini 100755 1 ( 0, 0) 11885364 /usr/bin/cinelerra
D: --- h# 3157 cinelerra-2.0-1
D: removing "cinelerra" from Name index.
D: removing 152 entries from Basenames index.
D: opening db index /var/lib/rpm/Group create mode=0x42
D: removing "Applications/Video" from Group index.
D: opening db index /var/lib/rpm/Requirename create mode=0x42
D: removing 32 entries from Requirename index.
D: opening db index /var/lib/rpm/Providename create mode=0x42
D: removing 86 entries from Providename index.
D: opening db index /var/lib/rpm/Dirnames create mode=0x42
D: removing 9 entries from Dirnames index.
D: opening db index /var/lib/rpm/Requireversion create mode=0x42
D: removing 32 entries from Requireversion index.
D: opening db index /var/lib/rpm/Provideversion create mode=0x42
D: removing 86 entries from Provideversion index.
D: opening db index /var/lib/rpm/Installtid create mode=0x42
D: removing 1 entries from Installtid index.
D: opening db index /var/lib/rpm/Sigmd5 create mode=0x42
D: removing 1 entries from Sigmd5 index.
D: opening db index /var/lib/rpm/Sha1header create mode=0x42
D: removing "b3473924bf10dd45dda648fc18e2988c6dcfbae4" from Sha1header index.
D: opening db index /var/lib/rpm/Filemd5s create mode=0x42
D: removing 152 entries from Filemd5s index.
D: running post-transaction scripts
D: closed db index /var/lib/rpm/Filemd5s
D: closed db index /var/lib/rpm/Sha1header
D: closed db index /var/lib/rpm/Sigmd5
D: closed db index /var/lib/rpm/Installtid
D: closed db index /var/lib/rpm/Provideversion
D: closed db index /var/lib/rpm/Requireversion
D: closed db index /var/lib/rpm/Dirnames
D: closed db index /var/lib/rpm/Triggername
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Requirename
D: closed db index /var/lib/rpm/Group
D: closed db index /var/lib/rpm/Basenames
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: May free Score board((nil))
While "rpm -e -vv kernel-devel-2.6.15-1.1948_FC5" gave only this:
# rpm -e -vv kernel-devel-2.6.15-1.1948_FC5
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db index /var/lib/rpm/Name rdonly mode=0x0
D: read h# 2953 Header SHA1 digest: OK (75d88632167359eb1eab4c8bf6657e554901a0b3)
D: ========== --- kernel-devel-2.6.15-1.1948_FC5 i686/linux 0x0
D: opening db index /var/lib/rpm/Requirename rdonly mode=0x0
D: ========== recording tsort relations
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth)
D: 0 0 0 0 1 0 -kernel-devel-2.6.15-1.1948_FC5.i686
D: closed db index /var/lib/rpm/Requirename
D: closed db index /var/lib/rpm/Name
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages create mode=0x42
D: mounted filesystems:
D: i dev bsize bavail iavail mount point
D: 0 0x00000700 4096 2859778 1867404 /
D: 1 0x00000003 4096 0 -1 /proc
D: 2 0x00000000 4096 0 -1 /sys
D: 3 0x0000000a 4096 0 -1 /dev/pts
D: 4 0x00000012 4096 80735 80734 /dev/shm
D: 5 0x00000301 4096 875887 10041750 /mnt/hda1
D: 6 0x00000013 4096 0 -1 /proc/sys/fs/binfmt_misc
D: 7 0x00000014 4096 0 -1 /net
D: sanity checking 1 elements
D: running pre-transaction scripts
D: computing 8167 file fingerprints
D: computing file dispositions
D: opening db index /var/lib/rpm/Basenames create mode=0x42
Everything seems to be the same except "rpm -e -vv kernel-devel-2.6.15-1.1948_FC5" stopped after the last line of debug output.
While I'm writing this rpm hasn't still finished its job and is consuming 95% of the CPU time.
Botond
24th February 2006, 11:24 PM
ps.: And of course there's nothing in /var/log/messages .
ausadl
25th February 2006, 02:00 AM
Install the package back with rpm -Uvh --force and then delete with rpm -e
ausadl
25th February 2006, 02:02 AM
Sorry, with rpm -ivh --force
Botond
25th February 2006, 09:31 AM
Now that's a problem! I can't find the package anywhere on the internet. It was part of the development kernel, and it has already been removed from every mirror.
ausadl
25th February 2006, 10:19 AM
I guess the package is not sitting in your yum cache anymore (/var/cache/yum/fedora-development/packages).
tomcat
25th February 2006, 03:58 PM
Did you already update your database? (updatedb) Maybe that helps.
lazlow
25th February 2006, 11:26 PM
Seems to be my day for advertising smartpm. It is quite good at fixing funky installation/removal problems. I am not a big fan of its repo system. No longer than it takes to install I would give it a try.
Lazlow
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.