位置:海鸟网 > IT > linux/Unix >

删除ubuntu中旧的kernel

删除ubuntu中旧的kernel

  #!/bin/bash

  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