# Uninstalling port and all (unused) dependencies



## bbzz (Nov 26, 2010)

Like the title says, how should I be able to uninstall a port and all dependencies which are not used by other programs. For example, how would I uninstall kde4 completely?
make deinstall under port only removes binaries for that port. So would pkd_delete -r work safely? Wouldn't it remove dependencies regardless of them being used or not by other programs?
Thanks.


----------



## fronclynne (Nov 26, 2010)

If you don't pass the -f flag it'll leave anything that something else depends upon, so it's generally very safe like that.

ports-mgmt/pkg_cutleaves also does a dandy job of removing unneeded libraries safely & recursively, as well.


----------

