Skip to content

Instantly share code, notes, and snippets.

@jbonney
Created July 31, 2014 06:56
Remove old kernels on Ubuntu server (http://ubuntuforums.org/showthread.php?t=2058377)
# Get info about current kernel
uname -a
# List installed kernels
dpkg-query -l | awk '/linux-image-*/ {print $2}'
# Remove old kernel and dependencies (DO NOT DELETE KERNEL FROM uname -a)
sudo apt-get --purge remove <Kernel>
sudo apt-get autoremove
# Update grub (usually not necessary)
sudo update-grub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment