Version:  2.0.40 2.2.26 2.4.37 3.13 3.14 3.15 3.16 3.17 3.18 3.19 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10

Linux/scripts/prune-kernel

  1 #!/bin/bash
  2 
  3 # because I use CONFIG_LOCALVERSION_AUTO, not the same version again and
  4 # again, /boot and /lib/modules/ eventually fill up.
  5 # Dumb script to purge that stuff:
  6 
  7 for f in "$@"
  8 do
  9         if rpm -qf "/lib/modules/$f" >/dev/null; then
 10                 echo "keeping $f (installed from rpm)"
 11         elif [ $(uname -r) = "$f" ]; then
 12                 echo "keeping $f (running kernel) "
 13         else
 14                 echo "removing $f"
 15                 rm -f "/boot/initramfs-$f.img" "/boot/System.map-$f"
 16                 rm -f "/boot/vmlinuz-$f"   "/boot/config-$f"
 17                 rm -rf "/lib/modules/$f"
 18                 new-kernel-pkg --remove $f
 19         fi
 20 done

This page was automatically generated by LXR 0.3.1 (source).  •  Linux is a registered trademark of Linus Torvalds  •  Contact us