I have read and analyzed the source of both packages
kernel-alive:
- 10 files in total
-
The scripts are well commented and easy to read
- /lib/modules/.old is used as a file
- the modules are deleted at the first boot after the update
-
protects only the running kernel (via uname -r)
-
/usr/lib/modules/.old/* is erroneously deleted with a time delay (although it is not used at all)
-
not robust because it depends on /lib/modules/.old and /lib/modules/backup/* to be in a certain state
-
has deleted modules of my installed kernels (and that more then once)
-
others also had problems with this package
kernel-modules-hook:
- 5 files in total
-
The scripts are inserted as a single line directly in exec
-
The scripts are therefore not commented and difficult to read
- /lib/modules/.old is used as a dir
-
protects all installed kernels. Before deleting modules, checks with pacman whether the corresponding kernel is still installed
-
The modules are first moved and only deleted with a time delay (It is possible to restore them if problems arise)
-
elegantly integrated into the system
The two packages are in great conflict with each other
- Both packages basically do the same thing (therefore only one of them should be installed)
- .old is used differently by both (file / dir)
- linux-module-cleanup.service is used by both
- linux-module-cleanup.conf is used by both
my recommendation:
use kernel-modules-hook instead of kernel-alive