How to identify and uninstall unnecessary packages

I installed openjdk and realized that I don't really need it.
In the process, whole crap loads of dependent packages were installed.

Is there an effective way to identify which one I don't need and uninstall them?

tommy
 
if you use portmaster,
Code:
portmaster -L
will show ports categorized by dependency. Look for root and leaf ports (ports that no other port is dependent upon).
 
If you are using the new package manager, pkgng, you can use the command below.
# pkg autoremove
 
Back
Top