pkg icon indicating copy to clipboard operation
pkg copied to clipboard

What's the difference between pkg-add(8) and pkg-install(8)?

Open 0mp opened this issue 3 years ago • 2 comments

In what case would I want to use pkg add instead of pkg install? It seems like pkg-install(8) covers all the functionalities of pkg-add(8).

Potentially related: https://github.com/freebsd/pkg/issues/1584

0mp avatar Jul 26 '22 15:07 0mp

pkg add is a remnant from the pkg_* tools time, it is still used by the freebsd repo, pkg-install(8) covers 99% of the functionnality of pkg-add, but the one where pkg-add does not go find its dependencies in the repo, but rather looking on the local filesystem close to where the package it has been asked to install reside (pkg_* style) mainly it is pkg-add is now mainly meant to be use because this is what the ports tree uses. Normal users should use pkg-install(8) 99.9% of the time

bapt avatar Jul 27 '22 07:07 bapt

Thanks, @bapt. I guess I'll try to add those details to the manual pages at some point (unless someone beats me to it).

0mp avatar Aug 19 '22 22:08 0mp