Use pkg-autoremove(8).How can I use portmaster to find installed ports that are not needed, and deinstall/clean them.
How can I use portmaster to find the path to a port that is needed to install say for example library file?
pkg info -W /usr/local/bin/perl
for example. Finding it in a port is going to be tricky. Although ports have a pkg-plist not all of them have it in a file, some ports generate the list dynamically.Keep in mind ports-mgmt/portmaster is a tool to build ports, once a port is installed it's a package and those are handled by pkg(8).