Old Kernel Cleanup
Well, Kano builds a new kernel when new features or security patches are needed. So you can install them but somehow you must deinstall the old ones, otherwise your hard disk will become full of kernels.
Kano has already prepared a Remove-Script for that
remove-all-kernels∞, get it with the following:
wget http://kanotix.com/files/fix/remove-all-kernels-completely.sh
and make it executable
chmod 755 remove-all-kernels-completely.sh
and then better move it into /usr/local/bin
mv remove-all-kernels-completely.sh /usr/local/bin
Be careful, you should not change the script!!!
Start your System with the kernel you want to keep.
#!/bin/sh
cd /boot
for v in vmlinuz-*; do
KERNEL=$(echo $v|sed s/vmlinuz-//)
if [ "$KERNEL" != "$(uname -r)" ]; then
apt-get remove --purge $(COLUMNS=200 dpkg -l|awk '{print $2}'|grep $KERNEL)
rm -rf /lib/modules/$KERNEL
rm -rf /usr/src/kernel-headers-$KERNEL
rm -rf /usr/src/linux-$KERNEL
fi
done
The script removes all
unused kernels!
:-)