4

I'm having a couple of issues with my Ubuntu server currently. When using apt for anything it tells me:

The following packages will be REMOVED
    linux-restricted-modules-2.6.28-11-server 
    linux-restricted-modules-2.6.28-19-server

But the uninstall fails because the directories and images already do not exist.

dkpg --list | grep linux-restricted-modules

...returns this information:

rH  linux-restricted-modules-2.6.28-11-server 2.6.28-11.15   
rH  linux-restricted-modules-2.6.28-19-server 2.6.28-19.24       

So the r means I want it removed and I think the H means it only half exists on the system or something?

How to I remove whatever is left of this package so I can stop receiving these error messages?

Thanks.

EDIT: Complete output of apt-get upgrade:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
  linux-restricted-modules-2.6.28-11-server linux-restricted-modules-2.6.28-19-server
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 5,046kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 59849 files and directories currently installed.)
Removing linux-restricted-modules-2.6.28-11-server ...
rmdir: failed to remove `/lib/modules/2.6.28-11-server/volatile/': No such file or     directory
FATAL: Could not open '/boot/System.map-2.6.28-11-server': No such file or directory
update-initramfs: Generating /boot/initrd.img-2.6.28-11-server
Cannot find /lib/modules/2.6.28-11-server
update-initramfs: failed for /boot/initrd.img-2.6.28-11-server
dpkg: error processing linux-restricted-modules-2.6.28-11-server (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-restricted-modules-2.6.28-19-server ...
rmdir: failed to remove `/lib/modules/2.6.28-19-server/volatile/': No such file or     directory
FATAL: Could not open '/boot/System.map-2.6.28-19-server': No such file or directory
update-initramfs: Generating /boot/initrd.img-2.6.28-19-server
Cannot find /lib/modules/2.6.28-19-server
update-initramfs: failed for /boot/initrd.img-2.6.28-19-server
dpkg: error processing linux-restricted-modules-2.6.28-19-server (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-restricted-modules-2.6.28-11-server
 linux-restricted-modules-2.6.28-19-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
4
  • 1
    Have a look at the /var/log/apt/term.log (as root) and try to find a reference to the packages. There should be a message why the remove operation failed.
    – arrange
    Aug 30, 2011 at 10:32
  • It basically states that the directories associated do not exist. I'll update my question with the complete output.
    – Jivings
    Aug 30, 2011 at 10:34
  • Please try to find the original (oldest) failed attempt.
    – arrange
    Aug 30, 2011 at 10:36
  • It first occurred when upgrading from Karmic to Lucid (current). The error message is the same as the above.
    – Jivings
    Aug 30, 2011 at 10:39

1 Answer 1

6

Find the /var/lib/dpkg/info/linux-restricted-modules-2.6.28-11-server.postrm file and move it somewhere else, for example

sudo mv /var/lib/dpkg/info/linux-restricted-modules-2.6.28-11-server.postrm /var/tmp

Then run the apt-get upgrade again. If that works, do the same to the other package.

This is not the best way of doing this, but it should work. The postrm script is failing, because you no longer have the kernel 2.6.28-11-server installed.

1
  • This seemed to have the desired effect! Thank you sir!
    – Jivings
    Aug 30, 2011 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .