Removing Weak Update Modules

In certain cases, you might remove weak update modules in place of a newer kernel, for example, in the case where an issue with a shipped driver has been resolved in a newer kernel. In this case, you might prefer to use the new driver rather than the external module that you installed as part of a driver update. See About Weak Update Modules for more information.

Two different approaches can be used to remove a weak update module.

  1. Remove the symbolic link manually.

    Because weak update modules are symbolically linked for each kernel version on the system, you can remove the symbolic link for the module from each kernel where you don't want it to apply. For example:

    sudo rm -rf /lib/modules/5.15.0-208.159.3.2.el8.x86_64/weak-updates/kmod-kvdo

    In this example, the weak update module, kmod-kvdo, is removed from the kernel, 5.15.0-208.159.3.2.el8.x86_64.

  2. Use the weak-modules command to remove the module.

    You can use the weak-modules command to remove a specified weak update module for all compatible kernels or use the command to remove the weak update module for the current kernel. You can also use the weak-modules command similarly to add weak update modules. For more information on this command, run:

    weak-modules -h

    You can also use the weak-modules command with the dry-run option to test the results without making actual changes, for example:

    weak-modules --remove-kernel --dry-run --verbose