Skip to content

Instantly share code, notes, and snippets.

@ziozzang
Created March 26, 2017 07:20
Show Gist options
  • Save ziozzang/fe432759044cceead13835e8fd67df01 to your computer and use it in GitHub Desktop.
Save ziozzang/fe432759044cceead13835e8fd67df01 to your computer and use it in GitHub Desktop.
Purge / Install new kernel for Ubuntu
#!/bin/bash
sudo add-apt-repository ppa:kernel-ppa/ppa
sudo apt-get update
sudo apt-get upgrade
#Purge old Kernel
sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment