Skip to content

Instantly share code, notes, and snippets.

@betrcode
Created July 12, 2018 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betrcode/9d5d32f4233acc802f4a0967002b5407 to your computer and use it in GitHub Desktop.
Save betrcode/9d5d32f4233acc802f4a0967002b5407 to your computer and use it in GitHub Desktop.
Clean up /boot on Ubuntu
#
# Taken from: https://askubuntu.com/questions/345588/what-is-the-safest-way-to-clean-up-boot-partition
#
# Command line method:
# First check your kernel version, so you won't delete the in-use kernel image, running:
uname -r
# Now run this command for a list of installed kernels:
dpkg --list 'linux-image*' | grep ^ii
# and delete the kernels you don't want/need anymore by running this:
sudo apt-get remove linux-image-VERSION
# Replace VERSION with the version of the kernel you want to remove.
# When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:
sudo apt-get autoremove
# And finally you can run this to update grub kernel list:
sudo update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment