This problem may occur in other virtualbox-guest-additions. I am working with virtualbox-guest-additions-6.0.14. If, in a gentoo virtualbox VM, I emerge virtualbox-guest-additions-6.0.14 and then unmerge the package, not all files installed by the emerge are removed. I don't if this is by design or is a bug in the ebuild. Reproducible: Always Steps to Reproduce: 1.emerge virtualbox-guest-additions 2.emerge --unmerge vitualbox-guest-additions 3. Actual Results: This sequence demonstrates the issue. GentooZFS / # ls -al /lib/modules/4.19.86-gentoo-x86_64/misc/ total 9 drwxr-xr-x 2 root root 2 Jan 2 15:16 . drwxr-xr-x 5 root root 18 Jan 2 15:06 .. GentooZFS / # emerge virtualbox-guest-additions These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ~] app-emulation/virtualbox-guest-additions-6.0.14::gentoo USE="-X" 0 KiB Total: 1 package (1 new), Size of downloads: 0 KiB >>> Verifying ebuild manifests >>> Emerging (1 of 1) app-emulation/virtualbox-guest-additions-6.0.14::gentoo >>> Installing (1 of 1) app-emulation/virtualbox-guest-additions-6.0.14::gentoo >>> Recording app-emulation/virtualbox-guest-additions in "world" favorites file... >>> Jobs: 1 of 1 complete Load avg: 4.31, 1.55, 0.72 >>> Auto-cleaning packages... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. GentooZFS / # equery f virtualbox-guest-additions * Searching for virtualbox-guest-additions ... * Contents of app-emulation/virtualbox-guest-additions-6.0.14: /etc /etc/init.d /etc/init.d/virtualbox-guest-additions /etc/xdg /etc/xdg/autostart /etc/xdg/autostart/vboxclient.desktop /lib /lib/modules /lib/modules/4.19.86-gentoo-x86_64 /lib/modules/4.19.86-gentoo-x86_64/misc /lib/modules/4.19.86-gentoo-x86_64/misc/vboxguest.ko /lib/modules/4.19.86-gentoo-x86_64/misc/vboxsf.ko /lib/systemd /lib/systemd/system /lib/systemd/system/virtualbox-guest-additions.service /lib/udev /lib/udev/rules.d /lib/udev/rules.d/60-virtualbox-guest-additions.rules /sbin /sbin/mount.vboxsf /usr /usr/bin /usr/bin/VBoxControl /usr/sbin /usr/sbin/vboxguest-service /usr/share /usr/share/doc /usr/share/doc/virtualbox-guest-additions-6.0.14 /usr/share/doc/virtualbox-guest-additions-6.0.14/xorg.conf.vbox.bz2 GentooZFS / # ls -al /lib/modules/4.19.86-gentoo-x86_64/misc/ total 326 drwxr-xr-x 2 root root 4 Jan 2 15:18 . drwxr-xr-x 5 root root 18 Jan 2 15:18 .. -rw-r--r-- 1 root root 554504 Jan 2 15:18 vboxguest.ko -rw-r--r-- 1 root root 149344 Jan 2 15:18 vboxsf.ko GentooZFS / # emerge -C virtualbox-guest-additions * This action can remove important packages! In order to be safer, use * `emerge -pv --depclean <atom>` to check for reverse dependencies before * removing packages. app-emulation/virtualbox-guest-additions selected: 6.0.14 protected: none omitted: none All selected packages: =app-emulation/virtualbox-guest-additions-6.0.14 >>> 'Selected' packages are slated for removal. >>> 'Protected' and 'omitted' packages will not be removed. >>> Waiting 5 seconds before starting... >>> (Control-C to abort)... >>> Unmerging in: 5 4 3 2 1 >>> Unmerging (1 of 1) app-emulation/virtualbox-guest-additions-6.0.14... * GNU info directory index is up-to-date. GentooZFS / # ls -al /lib/modules/4.19.86-gentoo-x86_64/misc/ total 326 drwxr-xr-x 2 root root 4 Jan 2 15:18 . drwxr-xr-x 5 root root 18 Jan 2 15:18 .. -rw-r--r-- 1 root root 554504 Jan 2 15:18 vboxguest.ko -rw-r--r-- 1 root root 149344 Jan 2 15:18 vboxsf.ko Expected Results: The two .ko files should be removed by the unmerge, but are not
Created attachment 602346 [details] emerge --info
This is actually by design: since your system might fail to boot with the kernel for which the external modules were compiled, these modules are not registered as part of the package they were installed by. Cleaning up is left as an exercise for the admin.