From 1e5e1c2398fa6a698063c18eb53b7a173f6c3328 Mon Sep 17 00:00:00 2001 From: "Ward Nakchbandi (Cosmic Fusion)" <83735213+CosmicFusion@users.noreply.github.com> Date: Fri, 2 Feb 2024 00:03:10 +0300 Subject: [PATCH] Update postrm --- linux-nvidia-modules/debian/postrm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/linux-nvidia-modules/debian/postrm b/linux-nvidia-modules/debian/postrm index c58534d..8ab6f8a 100644 --- a/linux-nvidia-modules/debian/postrm +++ b/linux-nvidia-modules/debian/postrm @@ -1,3 +1,17 @@ #! /bin/sh -depmod || echo "depmod: failed please investigate!" + +# Reset kernel modules +rm -rfv /usr/lib/modules/*/modules.alias || true +rm -rfv /usr/lib/modules/*/modules.builtin.alias.bin || true +rm -rfv /usr/lib/modules/*/modules.dep || true +rm -rfv /usr/lib/modules/*/modules.devname || true +rm -rfv /usr/lib/modules/*/modules.symbols || true +rm -rfv /usr/lib/modules/*/modules.alias.bin || true +rm -rfv /usr/lib/modules/*/modules.builtin.bin || true +rm -rfv /usr/lib/modules/*/modules.dep.bin || true +rm -rfv /usr/lib/modules/*/modules.softdep || true +rm -rfv /usr/lib/modules/*/modules.symbols.bin || true +# Regenerate kernel module configs +depmod -a || true +# Update initramfs with new module config update-initramfs -c -k all