Saturday, November 10, 2018

package management - Unable to resolve unmet dependencies because /boot is full and apt install -f can't finish

I'm trying to install openvpn however I am running into a problem where Ubuntu is complaining about unmet dependencies:



[sudo] password for keith: 
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-extra-4.4.0-71-generic : Depends: linux-image-4.4.0-71-generic but it is not going to be installed
linux-signed-image-4.4.0-71-generic : Depends: linux-image-4.4.0-71-generic (= 4.4.0-71.92) but it is not going to be installed

openvpn : Depends: libpkcs11-helper1 (>= 1.11) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


When I try to run apt-get -f install I'm met with these errors:



dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-71-generic_4.4.0-71.92_amd64.deb (--unpack):
cannot copy extracted data for './boot/System.map-4.4.0-71-generic' to '/boot/System.map-4.4.0-71-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error



If I run df -h I see the below:



Filesystem                    Size  Used Avail Use% Mounted on
udev 208M 0 208M 0% /dev
tmpfs 46M 5.2M 41M 12% /run
/dev/mapper/temptus--vg-root 8.3G 6.7G 1.2G 86% /
tmpfs 228M 4.0K 228M 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 228M 0 228M 0% /sys/fs/cgroup

/dev/sda2 473M 470M 0 100% /boot
/dev/sda1 511M 3.6M 508M 1% /boot/efi
tmpfs 46M 0 46M 0% /run/user/1000
/home/keith/.Private 8.3G 6.7G 1.2G 86% /home/Keith


As you can see, /dev/sda2 (/boot) is 100% used. I tried following Can't clean a full /boot because of unmet dependencies, which does free up space in /boot, however when I remove old kernels and finally run apt-get -f install, the space required always increases more than what I cleared.



For example, if I manage to run apt-get -f install before removing kernels it tells me I need 66.4mb of free space. But if I remove a kernel (4.4.31 for example), it increases to 122mb of free space and wants to reinstall whatever kernel I removed.




Is there a way to forcefully remove kernels and have Ubuntu not reinstall after running sudo apt-get -f install?



Thanks!

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 (...