1

My /boot/ partition is full and I can't purge old kernels, I've been trying the suggestions here but no luck How do I free up more space in /boot?

dpkg -l linux-image-\* | grep ^ii
ii  linux-image-4.4.0-71-generic       4.4.0-71.92  amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-72-generic       4.4.0-72.93  amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-75-generic       4.4.0-75.96  amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-78-generic       4.4.0-78.99  amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-79-generic       4.4.0-79.100 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-81-generic       4.4.0-81.104 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-83-generic       4.4.0-83.106 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-87-generic       4.4.0-87.110 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-89-generic       4.4.0-89.112 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-71-generic 4.4.0-71.92  amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-72-generic 4.4.0-72.93  amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-75-generic 4.4.0-75.96  amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-78-generic 4.4.0-78.99  amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-79-generic 4.4.0-79.100 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-81-generic 4.4.0-81.104 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-83-generic 4.4.0-83.106 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-87-generic 4.4.0-87.110 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP

sudo apt-get update suggests I Try 'apt-get -f install' with no packages (or specify a solution).

All I get for my efforts is this:

The following packages have unmet dependencies.
 linux-image-extra-4.4.0-93-generic : Depends: linux-image-4.4.0-93-generic but it is not going to be installed
 linux-image-extra-4.4.0-96-generic : Depends: linux-image-4.4.0-96-generic but it is not going to be installed
 linux-image-generic : Depends: linux-image-4.4.0-96-generic but it is not going to be installed
                       Recommends: thermald but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get autoremove returns

sudo apt-get autoremove
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-93-generic : Depends: linux-image-4.4.0-93-generic but it is not installed
 linux-image-extra-4.4.0-96-generic : Depends: linux-image-4.4.0-96-generic but it is not installed
 linux-image-generic : Depends: linux-image-4.4.0-96-generic but it is not installed
                       Recommends: thermald but it is not installed
E: Unmet dependencies. Try using -f.
6
  • Have you tried apt-get autoremove? That removes old kernels on my 16.04 server.
    – Scruffy
    Sep 22, 2017 at 21:54
  • I've tried every suggestion ubuntu has offered, I've added the result of autoremove above Sep 22, 2017 at 21:58
  • so I deleted using [sudo rm] some of the middle kernels, I'm guessing not the done thing, then ran autoremove and it is doing lots of removal at the moment. I would upmark your advice, but I don't have enough karma on this part of stackexchange. Sep 22, 2017 at 22:15
  • Once that finishes, if your problem is resolved, please accept my answer to reflect that.
    – Scruffy
    Sep 22, 2017 at 22:22
  • Take a look at askubuntu.com/questions/911563/… You need to give the package manager some working space to do anything.
    – ubfan1
    Sep 22, 2017 at 23:34

2 Answers 2

1

apt-get autoremove.

As you worked out yourself, you will have to remove an old kernel manually first.

After running apt-get autoremove, your boot partition should be much emptier. I personally have a root cron to do that weekly so I don't get into your situation.

Make sure you do an update and upgrade too to resolve the dependency issues, then reboot to start the new kernel.

0

Once you have run out of space and have half installed packages, apt gives up. You have to remove some packages with sudo dpkg -r xxxxx to get some free space, then you can have apt remove more.

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