0

I've got a stuck package system, due to the issue of trying to clean out /boot so updates will happen. Right now I am at the point where:

sudo apt-get -f install

Fails because it tries to install a package, which gets a /boot disk full error. Trying to remove packages does not work:

sudo apt-get --force-yes remove linux-image-extra-4.4.0-119-generic linux-image-extra-4.4.0-97-generic linux-signed-image-4.4.0-119-generic linux-signed-image-4.4.0-97-generic
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-generic : Depends: linux-image-4.4.0-119-generic but it is not going to be installed
                       Depends: linux-image-extra-4.4.0-119-generic but it is not going to be installed
 linux-signed-image-generic : Depends: linux-signed-image-4.4.0-119-generic but it is not going to be installed
                              Depends: linux-image-extra-4.4.0-119-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Suggestions?

1 Answer 1

1

It seems like you don't have enough space for the new Linux Kernel, so you have to delete the old one.

First, run this command:

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'

This will show you what packages will be removed. Make sure your current kernel version is not in that list. Run uname -a to see what your kernel version is.


Next, run this command to remove each of them using dpkg --remove. You could also just copy the name in the first section before the dpkg --remove command.

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs dpkg --remove


Finally, you will be able to run sudo apt-get -f install.

You must log in to answer this question.

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