# Find unused ports?



## donnex (May 15, 2009)

Hi, I'm running FreeBSD 6.x with portupgrade installed and I'm looking for a way to find old installed unused ports in order to deinstall them and do some cleanup.

Is it possible, and if so how, to search for ports wich do not have any other ports depend on them?

That way I can go thought and deinstall ports wich I no longer use or need.

All help is appreciated, thanks.


----------



## DutchDaemon (May 15, 2009)

ports-mgmt/pkg_cutleaves

Handle with care and be sure you know what you *can* remove.


----------



## donnex (May 15, 2009)

Thank you very much, pkg_cutleaves was just what I was looking for.


----------



## hydra (May 15, 2009)

Alternatively you may try ports-mgmt/pkg_rmleaves. I use this one.


----------



## shaoxuan (May 18, 2009)

What ports are unused ports? I execute pkg_cutleaves and pkg_rmleaves, the output ports are the same. But some ports listed I know is required to build other ports. How to explain this?


----------



## DutchDaemon (May 18, 2009)

I think these utilities only consider runtime dependencies (required to run the port), not 'buildtime' dependencies (required to build the port). So you'll find things like autoconf and automake in there. Deinstalling them is not a problem. If a new port installation needs them, they will simply be reinstalled.


----------

