Remove linux kernel images properly from Ubuntu/Debian

After some system upgrades with apt-get, you can get the /boot full of different versions of linux kernels. If the last one is stable for you, there is no reason to keep the old ones. A simple way to get this directory clean in a good way is to run this command:

dpkg --get-selections|grep 'linux-image*'|awk '{print $1}'|egrep -v "linux-image-$(uname -r)|linux-image-generic" |while read n;do apt-get -y remove $n;done

Source: http://ubuntuforums.org/showthread.php?t=1435818

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s