Skip to content

Instantly share code, notes, and snippets.

@janhalfar
Created April 4, 2018 21:54
Show Gist options
  • Save janhalfar/e867c3d98628718e6c7572763f2470bc to your computer and use it in GitHub Desktop.
Save janhalfar/e867c3d98628718e6c7572763f2470bc to your computer and use it in GitHub Desktop.
clean up ubuntu kernels

/boot full of garbage kernels

This discussion

https://askubuntu.com/questions/345588/what-is-the-safest-way-to-clean-up-boot-partition

has this answer:

https://askubuntu.com/a/809977

apt install -y byobu
purge-old-kernels -y --keep 1
apt-get -y autoremove --purge

butttt if there is too little space left you will still have to very carefully remove old kernels manually ...

# check current kernel
uname -r
# then rm /boot/<unused-crap-kernel-stuff>
# follow instructions above
# purge-old-kernels -y --keep 1
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment