Simplified (?) --depclean

· by Gürkan · Read in about 1 min · (130 Words)

I don't know why you exactly use --depclean for, but I just wanted to have a quick lookup which packages were safe to remove.

Then I saw "Number to remove: 350". Hehe. That might be "safe" to remove but the system won't be same after I delete kde-base/kdm etc.

I didn't want to deal with "searching on gentoo forums" stage and wrote a dirty one liner to see which packages are "really" the last one on the dependency tree. I've used gentoolkit and this probably isn't best way to see what I want to see.

for i in $(emerge --depclean -p | grep "All selected packages" | sed 's/All selected packages: //'); do [ -z $(equery depends $i | grep -Ev "* These")] && echo $i >> depclean.txt ; done