apk-upgrade(8)

πŸ’… apk-upgrade β€” like, the upgrade page, bestie

okay so real quick: this is apk-upgrade(8) from the System Manager's Manual, and it's the ✨glow-up✨ manual for apk upgrade. Buckle in, we're making your system fresh.


🌸 NAME

apk upgrade β€” upgrade installed packages (yes, the whole point πŸŽ€)


✨ SYNOPSIS

apk upgrade [<options>...] [<packages>...]

πŸ¦‹ DESCRIPTION

Okay so apk upgrade does the thing: it upgrades your installed packages to the latest version available from the package repositories you've got configured (peep apk-repositories(5) for the deets on those πŸ‘€).

When you don't pass any packages, all packages get upgraded if possible. No cap. And if you do hand it a list of packages, then only those packages get upgraded β€” along with whatever needed dependencies come with them.

Now here's the spicy part 🌢️: if the dependencies mentioned in --preupgrade-depends (check apk(8)) match a package that's upgradable, a preupgrade step happens. During that preupgrade step, the installed packages matching the preupgrade dependencies get upgraded if possible β€” and their dependencies are enforced (but not upgraded unless the dependencies in the new package require it). It's giving "we do a little pre-gaming" πŸ’…

Also!! An implicit preupgrade dependency is generated for the package that owns the apk executable. Iconic of it, honestly.


πŸ”₯ OPTIONS

apk upgrade supports the commit options described in apk(8), plus these beauties:

  • --available, -a β€” reset all packages to versions available from the current repositories. This resets all versioned dependencies in world (see apk-world(5)). On top of that, packages get selected from active repositories if possible, even if it means replacing or downgrading the package. Super useful for resetting your system against a new set of packages after you update your repositories ✨
  • --ignore β€” upgrade all other packages than the ones listed. Yep, it inverts the package name list you gave it, so it now means "these are the packages that should NOT be upgraded." Chaotic but valid 🫢
  • --latest, -l β€” always choose the latest package by version. BUT ⚠️ the versions considered are based on the package pinning. Mainly this overrides the default heuristic, and it'll cause an error to be displayed if all dependencies can't be satisfied.
  • --preupgrade[=BOOL] β€” if turned off, disables the preupgrade step. That's it, that's the vibe.
  • --preupgrade-only β€” perform only the preupgrade. Nothing else. Just the pre-game πŸŽ€
  • --prune β€” prune the world by removing packages that are no longer available from any configured repository. Cleanup era 🧹
ngl, -a and --prune can really rearrange your system β€” they're not just decorative flags, so know what you're doing before you commit πŸ’€

and that's the page, bestie πŸŒˆπŸ’–

signing off from the System Manager's Manual, dated 2026-11-02, brought to you by apk-upgrade(8) β€” go forth and upgrade slayfully πŸ‘‘βœ¨

πŸ“¦ where this page comes from