Say you have multiple gentoo-sources installed If you remove the folder /usr/src/linux-x.y.z, then the package gentoo-sources-x.y.z will not be uninstalled if you run 'emerge --depclean' So you have to uninstall it manually... Minor issue, but it would be nice to be fixed.
yes it will, what are you actually doing
Well.. it doesn't work.. I just retried.. and this happens on all my machines, laptops and VMs alike, running Gentoo. As you can see below, I have 3 versions of gentoo-sources installed: 4.4.45 4.4.46 4.4.47 but in /usr/src/ I only have linux-4.4.47, I manually removed linux-4.4.45 and 4.4.45 Then, when I run emerge --depclean, it should offer to remove gentoo-sources-4.4.45 & gentoo-sources-4.4.46, but it never happens. P50 ~ # eix gentoo-sources [I] sys-kernel/gentoo-sources Available versions: (3.4.113) 3.4.113^bs (3.4.113-r1) (~)3.4.113-r1^bs (3.4.9999) **3.4.9999^bs (3.10.95) 3.10.95^bs (3.10.104) (~)3.10.104^bs (3.10.104-r1) 3.10.104-r1^bs (3.12.52-r1) 3.12.52-r1^bs (3.12.66) 3.12.66^bs (3.12.68-r1) (~)3.12.68-r1^bs (3.12.69) (~)3.12.69^bs (3.12.70) (~)3.12.70^bs (3.12.9999) **3.12.9999^bs (3.14.58-r1) 3.14.58-r1^bs (3.14.79-r1) (~)3.14.79-r1^bs (3.18.25-r1) 3.18.25-r1^bs (3.18.44) 3.18.44^bs (3.18.45-r1) (~)3.18.45-r1^bs (3.18.47) (~)3.18.47^bs (4.1.15-r1) 4.1.15-r1^bs (4.1.35) 4.1.35^bs (4.1.36-r1) (~)4.1.36-r1^bs (4.1.37) 4.1.37^bs (4.1.38) (~)4.1.38^bs (4.4.39) 4.4.39^bs (4.4.44) (~)4.4.44^bs (4.4.45) (~)4.4.45^bs (4.4.46) (~)4.4.46^bs (4.4.47) (~)4.4.47^bs (4.9.4) [m](~)4.9.4^bs (4.9.5) [m](~)4.9.5^bs (4.9.6) [m](~)4.9.6^bs (4.9.6-r1) [m]4.9.6-r1^bs (4.9.7) [m](~)4.9.7^bs (4.9.8) [m](~)4.9.8^bs {build deblob experimental symlink} Installed versions: 4.4.45(4.4.45)^bs(04:53:22 AM 01/29/2017)(symlink -build -experimental) 4.4.46(4.4.46)^bs(03:01:33 AM 02/02/2017)(symlink -build -experimental) 4.4.47(4.4.47)^bs(03:02:33 AM 02/05/2017)(symlink -build -experimental) Homepage: https://dev.gentoo.org/~mpagano/genpatches Description: Full sources including the Gentoo patchset for the 4.9 kernel tree P50 ~ # ll /usr/src/ total 4 lrwxrwxrwx 1 root root 19 Feb 5 03:02 linux -> linux-4.4.47-gentoo drwxr-xr-x 26 root root 4096 Feb 5 03:09 linux-4.4.47-gentoo P50 ~ # emerge --depclean * Always study the list of packages to be cleaned for any obvious * mistakes. Packages that are part of the world set will always * be kept. They can be manually added to this set with * `emerge --noreplace <atom>`. Packages that are listed in * package.provided (see portage(5)) will be removed by * depclean, even if they are part of the world set. * * As a safety measure, depclean will not remove any packages * unless *all* required dependencies have been resolved. As a * consequence of this, it often becomes necessary to run * `emerge --update --newuse --deep @world` prior to depclean. Calculating dependencies... done! >>> No packages selected for removal by depclean >>> To see reverse dependencies, use --verbose Packages installed: 1423 Packages in world: 111 Packages in system: 44 Required packages: 1423 Number removed: 0 P50 ~ #
same issue with hardened-sources, if you remove the folder from /usr/src, it won't be uninstalled by emerge --depclean
Please post the contents of your /var/lib/portage/world file related to gentoo-sources and/or hardened-sources
here you go: P50 ~ # cat /var/lib/portage/world app-admin/keepass app-admin/sudo app-admin/syslog-ng app-admin/testdisk app-arch/dump app-arch/rar app-arch/unrar app-crypt/easy-rsa app-editors/atom app-editors/nano app-editors/vim app-emulation/docker app-emulation/virtualbox app-emulation/virtualbox-additions app-emulation/virtualbox-extpack-oracle app-emulation/vmware-workstation app-forensics/rkhunter app-misc/mc app-misc/screen app-office/gtg app-office/libreoffice app-portage/eix app-portage/genlop app-portage/gentoolkit app-portage/layman app-portage/pfl app-portage/portage-utils app-portage/repoman app-shells/bash-completion app-text/dos2unix dev-lang/php dev-lang/python dev-libs/libsigc++ dev-python/pip dev-tcltk/expect dev-util/ccache kde-apps/kde-meta kde-misc/krusader kde-plasma/plasma-meta lxde-base/lxdm mail-client/evolution mail-client/geary mail-client/thunderbird media-gfx/gimp media-gfx/shotwell media-libs/alsa-oss net-analyzer/nmap net-analyzer/traceroute net-fs/autofs net-fs/nfs-utils net-fs/samba net-fs/sshfs net-libs/nodejs net-misc/bridge-utils net-misc/dhcpcd net-misc/networkmanager-openvpn net-misc/networkmanager-vpnc net-misc/ntp net-misc/openvpn net-misc/remmina net-misc/sshpass net-misc/telnet-bsd net-misc/vpnc net-p2p/ktorrent sys-apps/hdparm sys-apps/hwinfo sys-apps/ifplugd sys-apps/less sys-apps/memtest86+ sys-apps/mlocate sys-apps/openrc sys-apps/pciutils sys-apps/pmount sys-apps/portage sys-apps/rescan-scsi-bus sys-apps/usermode-utilities sys-apps/v86d sys-apps/xinetd sys-block/gparted sys-block/parted sys-block/partimage sys-block/partitionmanager sys-boot/grub sys-boot/os-prober sys-boot/unetbootin sys-devel/gcc sys-fs/dosfstools sys-fs/eudev sys-fs/fuse-exfat sys-fs/mtools sys-fs/ntfs3g sys-fs/sysfsutils sys-kernel/gentoo-sources sys-kernel/gentoo-sources:4.4.45 sys-kernel/gentoo-sources:4.4.46 sys-kernel/linux-firmware sys-kernel/linux-headers sys-power/acpi sys-power/acpid sys-power/upower sys-process/dcron sys-process/htop www-client/firefox www-client/google-chrome www-client/opera x11-apps/mesa-progs x11-apps/xdm x11-base/xorg-drivers x11-base/xorg-x11 x11-misc/shutter x11-misc/xdotool
> sys-kernel/gentoo-sources:4.4.45 > sys-kernel/gentoo-sources:4.4.46 Portage is working as expected. When specifically listed in the world file, the slot will not be removed until it is either asked to be or the entry in the world file is removed. Then and only then will depclean activate on said kernels.
hmm it seems I had those specific versions added manually.. that explains why they are not removed by emerge --depclean Let me check my other machines..
You're right.. portage works as expected. I should have checked the world file first, I don't know why I didn't think of that :) thanks for your help!