Half installed package can't be removed

Don´t be shy, Linux is fun! =)
Post Reply
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Half installed package can't be removed

Post by ayu »

So I installed a .deb file, but it crashed in the middle so it only became half installed, and now I can't seem to remove it :S

Code: Select all

root@ubuntu:/home/user# dpkg --purge ovzkernel
dpkg: error processing ovzkernel (--purge):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 ovzkernel

Code: Select all

root@ubuntu:/home/user# apt-get remove ovzkernel
Reading package lists... Done
Building dependency tree        
Reading state information... Done
E: The package ovzkernel needs to be reinstalled, but I can't find an archive for it.
The package is broken so I can't reinstall it.
Anyone have any ideas?
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Half installed package can't be removed

Post by bad_brain »

any luck with

Code: Select all

apt-get -f install
?
:-k
Image

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Half installed package can't be removed

Post by ayu »

bad_brain wrote:any luck with

Code: Select all

apt-get -f install
?
:-k

nope :(

Code: Select all

root@ubuntu:/home/user# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package ovzkernel needs to be reinstalled, but I can't find an archive for it.
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Half installed package can't be removed

Post by bad_brain »

ok, try:

Code: Select all

dpkg --remove --force-remove-reinstreq ovzkernel
from the dpkg man page:
remove-reinstreq: Remove a package, even if it’s broken
and marked to require reinstallation. This may, for
example, cause parts of the package to remain on the
system, which will then be forgotten by dpkg.
Image

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Half installed package can't be removed

Post by ayu »

hmm seriously ... so annoying =/

still nothing ... maybe I should just reinstall the system again xF
But would be nice to find a solution in case this issue comes back later.

Code: Select all

root@ubuntu:/home/user# dpkg --remove --force-remove-reinstreq ovzkernel
dpkg: warning: overriding problem because --force enabled:
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
(Reading database ... 50935 files and directories currently installed.)
Removing ovzkernel ...
/var/lib/dpkg/info/ovzkernel.prerm: line 4: /sbin/new-kernel-pkg: No such file or directory
dpkg: error processing ovzkernel (--remove):
 subprocess installed pre-removal script returned error exit status 127
/var/lib/dpkg/info/ovzkernel.postinst: line 9: /sbin/new-kernel-pkg: No such file or directory
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 ovzkernel
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Half installed package can't be removed

Post by bad_brain »

hm, well, it said some files can remain, check the status of the package now:

Code: Select all

dpkg -l | grep ovzkernel
Image

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Half installed package can't be removed

Post by ayu »

Code: Select all

root@ubuntu:/home/user# dpkg -l | grep ovzkernel
rFR ovzkernel                           2.6.18-194.26.1.el5.028stab079.2  Virtuozzo Linux kernel (the core of the Linu
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Re: Half installed package can't be removed

Post by bad_brain »

hm, do you maybe have an older kernel version available in the GRUB menu that you can boot? you could try the forced removal in that one again....but that's just a guess to be honest.
Image

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Half installed package can't be removed

Post by ayu »

bad_brain wrote:hm, do you maybe have an older kernel version available in the GRUB menu that you can boot? you could try the forced removal in that one again....but that's just a guess to be honest.
I just reinstalled everything.
It's just a test system anyway, and I want to just do my experiment and be rid of it ^^

Let's hope it goes better this time.
And if it wont, then I'll post again :P
"The best place to hide a tree, is in a forest"

Post Reply