dotfiles/tools/remove_old_kernels

4 lines
177 B
Bash
Executable file

#!/bin/bash
sudo apt-get remove -y $(dpkg -l|egrep '^ii linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`)
sudo apt-get install -y linux-image-generic
sudo apt-get autoremove