I'm trying to keep my packages up-to-date and unused packages off my system. pkg has a feature called autoremove that will prune unused installed packages that were installed to fulfill dependencies. Internally, it stores this in a flag named automatic. Which operations with pkg, portinstall, portupgrade, and portmaster would make a package non-automatic?

  • Why do you want this? What is the usecase? – uzsolt May 29 '16 at 8:34
  • I'm selectively upgrading packages with portupgrade, and I'm making sure upgrading some library won't mark it as non-automatic so it can still be autoremoved. – David Ehrmann May 29 '16 at 15:13
  • I don't use portupgrade but I've a simple suggestion: upgrade only ONE automatic-installed library and check it :) – uzsolt May 29 '16 at 19:11
 pkg set -A 0 myPackage-1.2.3_4

Or use -A 1 to mark it as automatic.

Also, pkg query -a "%o %a" will list all of the packages and their automatic-ness. Or RTFM pkg-query for examples of how to list just the automatic or non-automatic packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.