My boot partition is full and I can't install new kernel versions. So I tried to remove some old versions like this:

  1. get active kernel

    uname -a

    Linux Ubuntu-1404-trusty-64-minimal 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

  2. get installed kernels

    dpkg -l linux-image-* | grep ^ii

    output: http://pastebin.com/X9P81W22

  3. now i try to remove linux-image-3.13.0-24-generic

    aptitude purge linux-image-3.13.0-24-generic

    output: http://pastebin.com/J4Zmhf9Y

I'm not shure because aptitude will delete linux-generic{a} and linux-image-generic{a} as well. Over 420MB will be freed. But my boot partition looks like this:

/dev/md1 488M 484M 0 100% /boot

is this normal??

  • Each kernel version comes as a set of packages. If you want to remove 3.13.0-24, remove all packages related to it (try dpkg -l|grep 3.13.0-24 and look at all those starting with linux-, not just linux-image-)
    – Dan
    Jul 8 '15 at 11:53
  • Yes, I know and aptitude will delete dependencies as well (look at output #3). my problem is: aptitude will delete linux-generic{a} and linux-image-generic{a} and I don't know why because, in my opinion, this is necessary for the current kernel, or not? Jul 8 '15 at 13:40
  • 1
    Aptitude tells you that those generic packages are not completely configured (since last update failed due to lack of space). Trying to remove only a part of an old kernel just confuses things further.
    – Dan
    Jul 8 '15 at 14:25

That seems normal to me. For each kernel package, most of the kernel code (modules such as drivers) is stored in /lib/modules/ (with some in /lib/firmware/).

On the other hand, the images in /boot require less than 10MB of disk space between them. The following lists the kernel image files for version 3.2.0-87 with sizes in kB.

4892    /boot/vmlinuz-3.2.0-87-generic
2836    /boot/System.map-3.2.0-87-generic
784     /boot/abi-3.2.0-87-generic
144     /boot/config-3.2.0-87-generic

Automatic removal of older / unused kernel packages

The following command is useful for automatically removing some (but not all) older / unused kernel packages:

sudo apt-get autoremove

Edit: I noticed that you are currently using the 3.13.0-43-generic kernel. It would be best to reboot the system to use the latest installed kernel, 3.13.0-55-generic. The above command would be most effective if you are already using the most recently installed kernel.

  • First, apt-get autoremove didn't work for me because I had a broken update of the newest kernel (because of less disk space). So I tried to move some 20MB kernel images to backup folder and tried aptitude safe-upgrade again. After that I run apt-get autoremove sucessfully - thx. Jul 8 '15 at 13:55

Askubuntu has questions (and answers) for that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.