Created
October 30, 2014 15:51
-
-
Save ejoubaud/7e28c2be66284b6d4310 to your computer and use it in GitHub Desktop.
Remove old kernels on a ubuntu box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Identify the revision of kernel running: | |
uname -r | |
# Identify installed kernel packages: | |
dpkg --get-selections | awk '((/^linux-/) && (/[0-9]./)) {print $1}' | |
# Reboot box if not running the latest installed kernel. | |
sudo reboot | |
# Remove kernel packages (being careful not to uninstall the currently running kernel). | |
sudo apt-get purge linux-image-2.6.32-47-server linux-image-2.6.32-48-server ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment