Click to See Complete Forum and Search --> : Removing Programs


Dark Ninja
06-04-2004, 04:11 PM
Well, I know what I want to do, but I can't figure out some (safe) way to do it.

Basically, I want to list all the packages I have installed on my Gentoo system (using emerge). I then want to figure out if anything is dependent on these packages. If nothing is, I would like to remove them.

Unfortunately, the second step seems to be near impossible (although, I haven't figured out the first one either). I'm wondering if what I want to do is possible. As I test out different software packages, I get a buildup of stuff I don't really need.

Can anybody help? Thanks.

hard candy
06-04-2004, 04:14 PM
Can you do an unmerge --test world (or whatever the equivalent is) ?

Dark Ninja
06-04-2004, 04:26 PM
Well, you can do emerge -Cp packagename but that won't tell you if you're destroying any dependencies (as I learned the hard way -- which is why I'm not asking my question here).

hard candy
06-04-2004, 04:35 PM
From the emerge manual (Man emerge)

clean (-c)

Cleans the system by removing packages that will not effect the functionality of the system. The arguments can be ebuilds, classes, or dependencies. For example, emerge clean binutils cleans out old versions of binutils; emerge clean net-www/mozilla-0.9.9-r2 cleans out that specific version of Mozilla. This is generally safe to use. Note that clean does not remove unslotted packages.


depclean

Determines all packages installed on the system that have no explicit reason for being there. emerge generates a list of packages which it expects to be installed by checking the system package list and the world file. It then compares that list to the list of packages which are actually installed; the differences are listed as unnecessary packages and are suggested for unmerging. WARNING: Removing some packages may cause packages which link to the removed package to stop working and complain about missing libraries. Re-emerge the complaining package to fix this issue. Note that changes in USE flags can drastically affect the output of depclean.

Also,
/var/cache/edb/world
Contains a list of all user-specified packages. You can safely edit this file, adding packages that you want to be considered in world class updates and removing those that you do not want to be considered.

Dark Ninja
06-04-2004, 04:41 PM
Yeah...depclean is what screwed me up before. I do know what did it, though, so maybe I'll try it again.

I guess I was looking for something that would keep track of whether a package is a dependency for some other package. That way, if I want to remove something, I could check to see if it's a dependency for something and, if not, I knew it would be safe to remove it.

However...I'm thinking there's nothing like that. Hmmm...darn. Would be handy.

As an example, though, Firefox is not a dependency for anything. However, it still is hidden from depclean. (It definitely has no explicit reason to be on the system.) Again, darn. :p