Portmaster - understanding it better

How can I use portmaster to find installed ports that are not needed, and deinstall/clean them.
Use pkg-autoremove(8).

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).
 
I use portmaster -s to trim unused packages. Adding the -y or -t argument, is supposed to make it answer yes without user intervention. The without prompting options work some of the time, it's either a bug that comes and goes, or a setting in /usr/local/etc/portmaster.rc has to be made.

For finding ports, there's also ports-mgmt/portsearch and ports-mgmt/portfind
 
Allow me to ask this question. First my understanding: installing a port using make(1) causes a package to be built, with the options I specified. Compiling a port takes wayyyyyy longer. When doing updates, often there will be ports that are current up to date and thus do not need to be rebuilt. So my question is: what portmaster(8) flag option allows the packages to remain on the system, and be reused?

How would/could the --packages, and --packages-build help me achieve this?
 
When using portmaster(8), you don't reuse packages. If a port has no update available, it will not be rebuilt unless a dependency of it has changed and the port has to be rebuilt against the updated dependency. The port has to be rebuilt in this case and you can't use current package as it's built against the old dependency.
 
Back
Top