Skip to content

Instantly share code, notes, and snippets.

@george-haddad
Created August 11, 2022 08:06
Show Gist options
  • Save george-haddad/fa9409d3e221ae7e7e04c49502ce94f1 to your computer and use it in GitHub Desktop.
Save george-haddad/fa9409d3e221ae7e7e04c49502ce94f1 to your computer and use it in GitHub Desktop.
Free up boot drive for more kernels

It has come to the point where I have been given a Linux laptop and the /boot partition is really small and only holds 2 kernels. Each time I try to upgrade it stops beacuse the /boot partition runs out of space.

Here are some commads I use to free up some space.

# check what kernel version I am currently using
uname -a

# list the kernels currently installed
sudo dpkg --list | egrep -i --color 'linux-image|linux-headers|linux-modules' | awk '{ print $2 }'

# delete the kernels I am not using
sudo apt purge <list of kernels I don't want>

Thanks to this SO post that helped me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment