
On Wed, Oct 09, 2024 at 12:25:16PM +0200, Axel Braun wrote:
Hi,
I got a low-space warning on my root folder, and found that /usr/lib/modules is populated back to 5.11.x kernel - Nvidia modules. I wonder if they are not cleaned up when a new kernel is coming? Anything that can be done to automate this?
Tried that before, but gave up in the end. :-( For documentation purposes I left in the package: %triggerpostun/kmp-triggerpostun.sh # # Unfortunately doesn't work since kernel updates are not considered "atomar" # when using YaST/zypper (only safe when using rpm) [boo#1182666] # #for dir in $(find /lib/modules -mindepth 1 -maxdepth 1 -type d); do # if [ ! -d $dir/kernel ]; then # test -d $dir/updates && rm -f $dir/updates/nvidia*.ko # fi #done If you want to get rid of the modules in a manual way you can run rpm -e <kmp-package> --nodeps zypper in <kmp-package> because of %postun/kmp-postun.sh if [ "$1" = 0 ] ; then [...] # get rid of *all* nvidia kernel modules when uninstalling package (boo#1180010) for dir in $(find /lib/modules -mindepth 1 -maxdepth 1 -type d); do test -d $dir/updates && rm -f $dir/updates/nvidia*.ko [...] done [...] fi Thanks, Stefan Public Key available ------------------------------------------------------ Stefan Dirsch (Res. & Dev.) SUSE Software Solutions Germany GmbH Tel: 0911-740 53 0 Frankenstraße 146 FAX: 0911-740 53 479 D-90461 Nürnberg http://www.suse.de Germany ---------------------------------------------------------------- Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman (HRB 36809, AG Nürnberg) ----------------------------------------------------------------