Ok, then I would duplicate the logic of explain/LINUX-IMAGE script in several new "explain" scripts.
https://github.com/a-detiste/cruft/blob/master/explain/LINUX-IMAGE ..or if there can always be only one version of dkms module present, this is enough: (explain/kdbus-dkms) #!/bin/dash set -e ver=$(uname -r) test -e /lib/modules/${ver}/updates/dkms/kdbus.ko && echo /lib/modules/${ver}/updates/dkms/kdbus.ko > Hi, > > not sure. > E.g. I found this file using cruft : > Konsole output > ls -l /lib/modules/3.12-1-amd64/updates/dkms/vboxpci.ko > -rw-r--r-- 1 root root 32168 Jan 6 2014 > /lib/modules/3.12-1-amd64/updates/dkms/vboxpci.ko > > > But obviously this kernel is not installed any more, and dkms does not > know anything about this file as well. > I would have been excluded/not shown using your patterns. You'right, once I run "cruft" on a box running testing since 2002 and I found at lot of old files left behind; these should be found & deleted. > > > Achim > On 26.09.2015 23:24, Alexandre Detiste wrote: > > Hi, > > > > The files need to be matched against precise package names: > > > > Something like this: > > > > dkms: > > /lib/modules/*/updates > > /lib/modules/*/updates/dkms > > > > spl-dkms: > > /lib/modules/*/updates/dkms/spl.ko > > /lib/modules/*/updates/dkms/splat.ko > > > > virtualbox-dkms: > > /lib/modules/*/updates/dkms/vboxdrv.ko > > /lib/modules/*/updates/dkms/vboxnetadp.ko > > /lib/modules/*/updates/dkms/vboxnetflt.ko > > /lib/modules/*/updates/dkms/vboxpci.ko > > > > kdbus-dkms: > > /lib/modules/*/updates/dkms/kdbus.ko > > > > zfs-dkms (? can't find this package in the archive): > Still in the new queue :-) > So I used a different source... > > > > /lib/modules/*/updates/dkms/zcommon.ko > > /lib/modules/*/updates/dkms/zfs.ko > > /lib/modules/*/updates/dkms/znvpair.ko > > /lib/modules/*/updates/dkms/zpios.ko > > /lib/modules/*/updates/dkms/zunicode.ko > > > > > > Le samedi 26 septembre 2015, 22:14:22 Achim Schaefer a écrit : > >> Package: cruft-common > >> Version: 0.9.21 > >> Severity: normal > >> > >> Dear Maintainer, > >> > >> using dkms I get all the kernel modules which are installed by dkms > reported. > >> e.g dkms shows: > >> dkms status > >> kdbus, 20150824t110616.0c05fbd, 4.2.0-trunk-amd64, x86_64: installed > >> spl, 0.6.5, 4.2.0-trunk-amd64, x86_64: installed > >> vboxhost, 5.0.4, 4.2.0-trunk-amd64, x86_64: installed > >> zfs, 0.6.5.1, 4.2.0-trunk-amd64, x86_64: installed > >> > >> but cruft reports all these files: > >> /lib/modules/4.2.0-trunk-amd64/updates > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/kdbus.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/spl.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/splat.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/vboxdrv.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/vboxnetadp.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/vboxnetflt.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/vboxpci.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/zavl.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/zcommon.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/zfs.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/znvpair.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/zpios.ko > >> /lib/modules/4.2.0-trunk-amd64/updates/dkms/zunicode.ko > >> > >> Thanks > >> > >> Achim > Achim >