Ubuntu – How to make space in /boot/

boot-partitioncleanupdeleteencryption

I have /boot/ on a separate partition from /, and /boot/ is 98% full. How do I make more space on it?

Best Answer

  • You can free space by uninstalling unneeded (old) versions the Linux Kernel.

    1. Get a list of installed Kernels like this:

      confus@confusion:~$ dpkg --list | grep -E "linux-header|linux-image"
      ii  linux-headers-3.5.0-18-generic            3.5.0-18.29                                amd64        Linux kernel headers for version 3.5.0 on 64 bit x86 SMP
      ii  linux-headers-3.5.0-23-generic            3.5.0-23.35                                amd64        Linux kernel headers for version 3.5.0 on 64 bit x86 SMP
      ii  linux-image-3.5.0-18-generic              3.5.0-18.29                                amd64        Linux kernel image for version 3.5.0 on 64 bit x86 SMP
      ii  linux-image-3.5.0-23-generic        3.5.0-23.35                                amd64        Linux kernel image for version 3.5.0 on 64 bit x86 SMP                               amd64        Generic Linux kernel image
      
    2. Find out, what kernel you are running. E.g. by running the command:

      confus@confusion:~$ uname -r
      3.5.0-23-generic
      

      In this example my kernel version is "3.5.0-23-generic".

    3. Provided this kernel works perfectly for you and you don't have any bugs, remove everything BUT this kernel. In my example this would be accomplished by:

      sudo apt-get remove linux-image-3.5.0-18-generic linux-headers-3.5.0-18-generic
      

    Remove obsolete linux-images using synaptic

    If you want a graphical tool use synaptic package manager (you might need to install it in Software Center. You can search for "linux-headers" and "linux-image" and sort them, installed packages first. Then mark them for removal.

  • Related Question