diff --git a/scripts/falco-driver-loader b/scripts/falco-driver-loader index 0cdff090aad..9494253a28c 100755 --- a/scripts/falco-driver-loader +++ b/scripts/falco-driver-loader @@ -300,16 +300,16 @@ clean_kernel_module() { return fi - DRIVER_VERSIONS=$(dkms status -m "${DRIVER_NAME}" | cut -d',' -f2 | sed -e 's/^[[:space:]]*//') + DRIVER_VERSIONS=$(dkms status -m "${DRIVER_NAME}" | cut -d',' -f1 | sed -e 's/^[[:space:]]*//') if [ -z "${DRIVER_VERSIONS}" ]; then echo "* There is no ${DRIVER_NAME} module in dkms" return fi for CURRENT_VER in ${DRIVER_VERSIONS}; do - if dkms remove -m "${DRIVER_NAME}" -v "${CURRENT_VER}" --all 2>/dev/null; then - echo "* Removing ${DRIVER_NAME}/${CURRENT_VER} succeeded" + if dkms remove "${CURRENT_VER}" --all 2>/dev/null; then + echo "* Removing ${CURRENT_VER} succeeded" else - echo "* Removing ${DRIVER_NAME}/${CURRENT_VER} failed" + echo "* Removing ${CURRENT_VER} failed" exit 1 fi done