Skip to content

Instantly share code, notes, and snippets.

@hsuh
Last active August 29, 2015 14:20
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 hsuh/d0e6727e42fc2c504734 to your computer and use it in GitHub Desktop.
Save hsuh/d0e6727e42fc2c504734 to your computer and use it in GitHub Desktop.
Removing old linux images
*** 1. Remove --no-act for run the commands for real.
*** 2. Find out the range of your kernel version numbers and replace the numbers below. e.g. {start..end}
Finding out versions:
dpkg -l | grep linux-image
Purging the images:
sudo dpkg -P --no-act --force-depends linux-image-3.13.0-{32..46}-generic
sudo dpkg -P --no-act --force-depends linux-image-extra-3.13.0-{32..46}-generic
sudo dpkg -P --no-act --force-depends linux-headers-3.13.0-{32..46}-generic
sudo dpkg -P --no-act --force-depends linux-headers-3.13.0-{32..46}
Cleaning afterwards:
sudo apt-get autoclean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment