Skip to content

Instantly share code, notes, and snippets.

@roxlu
Created October 20, 2015 15:15
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 roxlu/4793b91edddc7a24c348 to your computer and use it in GitHub Desktop.
Save roxlu/4793b91edddc7a24c348 to your computer and use it in GitHub Desktop.
$ dpkg -l linux-{image,headers}-"[0-9]*" | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e '[0-9]' | xargs sudo apt-get -y purge
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-image-server : Depends: linux-image-3.0.0-32-server but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment