Low disk space on “boot”

Ubuntu downloads upgrades as new kernel and leaves the old kernels in /boot so you have the option to revert to old kernels. This had my /boot on “low disk space” so I had to delete old kernels.

Screenshot from 2017-06-23 12-06-36

I followed the instructions in this thread for a fix.

  1. Check current version of your kernel with uname -a.
  2. List down old packages with
    dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'
  3. Delete each package with sudo apt-get -y purge some-kernel-package.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s