Saturday, March 23, 2019

apt - How can I remove a package?


How to remove linux-image-extra-3.13.0-49-generic from my system?


I can't install any package because of this error:


$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-extra-3.13.0-49-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 152 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 225623 files and directories currently installed.)
Removing linux-image-extra-3.13.0-49-generic (3.13.0-49.83) ...
depmod: FATAL: could not load /boot/System.map-3.13.0-49-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-49-generic
grep: /boot/config-3.13.0-49-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_UCk0cv/lib/modules/3.13.0-49-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_UCk0cv/lib/modules/3.13.0-49-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
run-parts: executing /etc/kernel/postinst.d/zz-runlilo 3.13.0-49-generic /boot/vmlinuz-3.13.0-49-generic
Added Linux *
Fatal: open /boot/vmlinuz-3.13.0-49-generic.efi.signed: No such file or directory
run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1
dpkg: error processing package linux-image-extra-3.13.0-49-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-3.13.0-49-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

It's not the same as http://askubuntu.com/questions/89710/how-do-i-free-up-more-space-in-boot question as apt-get purge xxx doesn't work(the same error).



I've searched lots of answers and tried every one I can with no luck.


the sudo apt-get -f install and sudo apt-get install otherpackage all get the same error as above in the end:


I can't install or remove any packages. The solution is simple(It took me one day):


Just download vmlinuz-3.13.0-49-generic.efi.signed file to /boot folder, then run sudo apt-get autoremove


Since then everything is ok. Thanks all for you help and time!


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...