03.06.2023, 19:21 UhrDeutsch | English
Hallo Gast [ Registrierung | Anmelden ]

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.

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

The script removes all unused kernels!
XML Revisions of $tag
Seiten-History :: Letzter Editor : Richard :: Eigentümer : CokeintheBottle ::
Powered by pnWikka 1.0
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.