Index: /trunk/src/VBox/Installer/linux/prerm-common.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/prerm-common.sh	(revision 68026)
+++ /trunk/src/VBox/Installer/linux/prerm-common.sh	(revision 68027)
@@ -30,5 +30,4 @@
 # error).
 
-OLDMODULES="vboxdrv vboxnetflt vboxnetadp vboxpci"
 
 # The below is GNU-specific.  See VBox.sh for the longer Solaris/OS X version.
@@ -68,16 +67,3 @@
 remove_init_script vboxnet >/dev/null 2>&1
 rm -f /sbin/vboxconfig
-# Remove any generated modules
-if [ -z "$VBOX_DONT_REMOVE_OLD_MODULES" ]; then
-    for i in ${OLDMODULES}; do
-        # Remove old modules.
-        rm -f /lib/modules/*/misc/"${i}"*
-        # This second is no longer used.  Remove the line some time.
-        rm -f /lib/modules/*/kernel/misc/"${i}"*
-    done
-    # Remove leftover module folders.
-    for i in /lib/modules/*/misc; do
-        test -d "${i}" && rmdir -p "${i}" 2>/dev/null
-    done
-fi
 exit 0
Index: /trunk/src/VBox/Installer/linux/vboxdrv.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/vboxdrv.sh	(revision 68026)
+++ /trunk/src/VBox/Installer/linux/vboxdrv.sh	(revision 68027)
@@ -284,4 +284,6 @@
         chown root:vboxusers /dev/vboxusb 2>/dev/null
     fi
+    # Remove any kernel modules left over from previously installed kernels.
+    cleanup only_old
     succ_msg "VirtualBox services started"
 }
@@ -366,5 +368,12 @@
 cleanup()
 {
+    # If this is set, only remove kernel modules for no longer installed
+    # kernels.  Note that only generated kernel modules should be placed
+    # in /lib/modules/*/misc.  Anything that we should not remove automatically
+    # should go elsewhere.
+    only_old="${1}"
     for i in /lib/modules/*; do
+        # Check whether we are only cleaning up for uninstalled kernels.
+        test -n "${only_old}" && test -e "${i}/kernel/drivers" && continue
         # We could just do "rm -f", but we only want to try deleting folders if
         # we are sure they were ours, i.e. they had our modules in beforehand.
