PKG-UPDATE(8)
π PKG-UPDATE β the section 8 glow-up you didn't know you needed
okay so real talk, this is pkg-update(8) from the System Manager's Manual, and it's genuinely one of the most underrated little commands in the pkg squad. she's not flashy, she's just doing the quiet background work that makes everything else not fall apart. icon behaviour honestly π«Ά
β¨ NAME β¨
pkg update β updates the local catalogues of the enabled package repositories. that's it. that's the whole job. and yet?? she keeps the whole ecosystem alive π
πΈ SYNOPSIS πΈ
pkg update [-fq] [-r reponame ...]
pkg update [--{force,quiet}] [--repository reponame ...]
like, two whole ways to say the same thing. the short-flag version and the long-flag version. pick your fighter bestie π
π¦ DESCRIPTION π¦
so pkg update is the girl who goes out and refreshes your local copy of the repository catalogues from the remote package repository databases. she's fetching the receipts. keeping you current. living her truth β¨
here's the cute part: updates to catalogues are normally downloaded only when the master copy on the remote package repository is newer than the local copy. so she's not out here re-downloading stuff for no reason, she peeks first. efficient queen π
which repository catalogues get updated? those are defined in the pkg.conf(5) file, or by the entries in /usr/local/etc/pkg/repos. go read pkg.conf(5) for the deets, it's all there i promise π
best practice moment β it is best practice to make sure your package repository catalogues are up to date before doing any package installation (via pkg-install(8)) or upgrades (via pkg-upgrade(8)). HOWEVER. plot twist. explicitly running pkg update is not normally necessary π«’ because by default, invoking either pkg install or pkg upgrade will cause repository catalogues to be updated automatically β unless you disabled it by setting REPO_AUTOUPDATE to false in pkg.conf(5). so she's often doing this all by herself, no credit, no shoutout. main character energy tbh π
π Signed repositories
if the repository catalogue is signed and PUBKEY is defined for the repository, the signature will be verified after download. verified. after download. no shady business getting through on her watch π see pkg.conf(5) for more info bestie.
β OPTIONS β
the following options are supported by pkg update β and yes there's only three, she's a minimalist:
-q,--quietβ force quiet output. she goes non-verbal. still slaying, just silently π-f,--forceβ force a full download of the repository catalogue without regard to the respective ages of the local and remote copies of the catalogue. like, she's not even gonna check who's newer, she's just downloading the whole thing regardless π₯-r reponame,--repository reponameβ download the catalogue for the named repository only. this option can be specified multiple times to update several repositories. and here's the kicker: this will update only the named repositories, irrespective of the configured βenabledβ status fromrepo.conf. so even if it's marked disabled, if you name it, she's updating it. no questions asked π
πΏ ENVIRONMENT πΏ
the following environment variables affect the execution of pkg update. see pkg.conf(5) for further description β she's not gonna repeat herself:
PKG_DBDIRREPO_AUTOUPDATE
π FILES π
see pkg.conf(5). that's the whole section. she's mysterious like that β¨
π SEE ALSO π
okay this list is LONG bestie, buckle up, she's got a whole extended family and every single one of them is getting a shoutout because we don't do favourites in this house π
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-add(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-updating(8), pkg-upgrade(8), pkg-version(8), pkg-which(8)
like i said. whole family. all iconic. periodt π§
and that's the page bestie π this was written up for Debian, dated July 7, 2024, and it's part of the System Manager's Manual β so next time you see her quietly refreshing catalogues in the background, say thank you. she deserves it πβ¨
π¦ 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