PKG-ADD(8)
π pkg-add(8) β the system manager's manual, but make it cute π
okay so bestie, you're looking at pkg-add(8), and it's literally the whole vibe of "register a package AND install it on the system in one go." no cap, that's the entire energy. slay. π
β¨ NAME β¨
pkg add β registers a package and installs it on the system π«Ά
πΈ SYNOPSIS πΈ
pkg add [-IAfMq] pkg-name ...
pkg add [-IAfMq] <protocol>://<path>/<pkg-name> ...
pkg add [--{no-scripts,automatic,force,accept-missing,quiet}]
[--relocate location] pkg-name ...
pkg add [--{no-scripts,automatic,force,accept-missing,quiet}]
[--relocate location] <protocol>://<path>/<pkg-name> ...
like, pick your fav flavor of spelling, the long options and the short ones do the same thing, iykyk π
π¦ DESCRIPTION π¦
pkg add installs packages, and it does it from either a local source or a remote one β main character energy, honestly π
When you're installing from a remote source, bestie, you have to specify the protocol to use when fetching the package. that's not optional, that's the whole thing β¨
Currently supported protocols are FTP, HTTP and HTTPS. periodt.
Otherwise, pkg add will read the file named on the command line.
If this is a regular file, and the package to be installed has unmet dependencies, pkg add will search the directory containing pkg-name for suitable pkg archive files to fulfill those dependencies. like it just goes looking around the neighborhood for what it needs π
If pkg-name is literally - then it will read the package data from stdin. yep, the humble little dash. iconic.
pkg add will automatically detect and unpack most common compression formats based on the content of the data stream it reads, ignoring any extension the filename may have. so don't stress about the filename lying to you β it reads the vibes, not the label π§
β οΈ okay important one: If this involves reading from a pipe (including stdin), fifo, socket or some other non-regular form of input stream then pkg add will immediately emit an error if pkg-name has unmet dependencies. no negotiating, no waiting, it just screams. π
π OPTIONS π
The following options are supported by pkg add:
-A,--automaticβ Mark the installed packages as automatic. They'll be automatically removed if no other packages depend on them. For more information please refer topkg-autoremove(8). (so basically, they're on their own deletion watchlist the moment nothing needs them π³)-f,--forceβ Force the reinstallation of the package if it's already installed. yeah, we're doing it again and we're not asking permission π-I,--no-scriptsβ If any installation scripts (pre-install or post-install) exist for the given packages, do not execute them. they get skipped entirely, not even a little run.-M,--accept-missingβ Force the installation of the package with missing dependencies. bold. risky. very "i'll deal with it later" of you π₯-q,--quietβ Force quiet output. shhh, minimal noise, just let it happen π€«--script-no-execβ Do not execute the pre-install and post-install scripts but still log the scripts in the package database for future reference. Unlike-I, which prevents scripts from both running and being recorded,--script-no-execonly suppresses execution. so the scripts are still filed away for later, just not performed β the difference matters, bestie π--relocate locationβ Annotates the package as having been relocated to location, which is an alternate system root. This is an experimental feature and intended for cross-architecture package management. There is no corresponding single letter option. (DEPRECATED) π
okay so on that last one: experimental + deprecated is a truly cursed combo, so like... know that going in. and no, there's no cute one-letter shortcut for it. π
π ENVIRONMENT π
The following environment variables affect the execution of pkg add. See pkg.conf(5) for further description.
DEFAULT_ALWAYS_YESASSUME_ALWAYS_YESHANDLE_RC_SCRIPTSPKG_DBDIR
that's the whole list, no cap. also, note that the original page literally just lists them here and points you at pkg.conf(5) for the details β so go read that, bestie π¦
π FILES π
See pkg.conf(5). that's it, that's the section, go off π
π SEE ALSO π
pkg_create(3), pkg_printf(3), pkg_repo_create(3), pkg_repos(3), pkg-keywords(5), pkg-lua-script(5), pkg-repository(5), pkg-script(5), pkg-triggers(5), pkg.conf(5), pkg(8), pkg-alias(8), pkg-annotate(8), pkg-audit(8), pkg-autoremove(8), pkg-check(8), pkg-clean(8), pkg-config(8), pkg-create(8), pkg-delete(8), pkg-fetch(8), pkg-help(8), pkg-info(8), pkg-install(8), pkg-key(8), pkg-lock(8), pkg-plugins(8), pkg-query(8), pkg-register(8), pkg-repo(8), pkg-repositories(8), pkg-rquery(8), pkg-search(8), pkg-set(8), pkg-shell(8), pkg-shlib(8), pkg-ssh(8), pkg-stats(8), pkg-triggers(8), pkg-unregister(8), pkg-update(8), pkg-updating(8), pkg-upgrade(8), pkg-version(8), pkg-which(8)
like, the entire friend group. all of them. go say hi π
and that's the page!! this one came from the Debian crew, dated May 25, 2014 β yes bestie, a certified vintage, we stan an old queen πβ¨
π¦ where this page comes from
- nixos 26.05: pkg 2.7.5
- nixpkgs unstable: pkg 2.7.5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms