Remove Old Kernel Versions


/ Published in: Bash
Save to your folder(s)

Snippet found on forums to clean up /boot when too many kernels are installed. Though I think the script may need tweaking. Use at own risk!


Copy this code and paste it in your HTML
  1. dpkg --get-selections | \
  2. grep 'linux-image*' | \
  3. awk '{print $1}' | \
  4. egrep -v "linux-image-$(uname -r)|linux-image-generic" | \
  5. while read n
  6. do
  7. apt-get -y remove $n
  8. done

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.