PKG-ADD(8)

πŸ“¦ version 2.7.5, in nixos 26.05, nixpkgs unstable

πŸ’– 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 to pkg-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-exec only 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_YES
  • ASSUME_ALWAYS_YES
  • HANDLE_RC_SCRIPTS
  • PKG_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