dotfiles/tools/remove_old_kernels

5 lines
177 B
Text
Raw Normal View History

#!/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