apk-world(5)

πŸ’… apk-world(5) β€” the File Formats Manual, but make it a group chat

okay so real talk bestie, this is the manual page for apk-world from the File Formats Manual section, and it's honestly lowkey iconic once you get what it's doing. let's go 🫢


✨ NAME ✨

/etc/apk/world β€” the literal list of constraints that your package selection has to fulfil. that's it, that's the whole name. slay πŸŽ€


πŸ’– DESCRIPTION πŸ’–

so at /etc/apk/world, apk maintains the world β€” which is just the fancy way of saying: the running list of constraints that the package selection needs to fulfil. it's giving "the main character of your install" ngl πŸ‘‘

bestie heads up 🚨 if you edit this file manually, you should run apk-fix(8) to actually apply the changes. don't just edit and walk away like nothing happened, that's not the vibe fr fr.

🌸 PACKAGE SPECIFICATION 🌸

this is a plaintext file, one constraint per line, using dependency notation. each line has the format:

[!]name{@tag}{[<>~=]version}

when you're modifying an existing installation, the installed version is preferred β€” unless an upgrade is requested, or a world constraint or package dependency requires an alternate version. the way it just respects what's already there 😌

πŸ¦‹ tagged repositories, iykyk

to enable selection from a tagged repository, use the format name@tag, e.g. busybox@edge. see apk-repositories(5) for the details on tagged package repositories.

untagged repositories are also considered for constraints with a tag. the tag is inherited to all dependencies as an allowed repository. that is: the dependencies are selected from the tagged repository if the name@tag has a dependency with a version constraint requiring a version available only from the tagged repository. if the dependency can be satisfied from a non-tagged repository, it will be preferred. periodt ✨

πŸ’… version operators

to constrain the acceptable versions of the package, use the =, <, >, >=, ~, >~ or <~ operators. respect the order bestie, they mean:

  • = β€” the package is equal to the specified version
  • < β€” less than it
  • > β€” greater than it
  • >= β€” greater than or equal to it
  • ~ β€” prefix match
  • >~ β€” greater than or prefix match
  • <~ β€” less than or prefix match

the ~ operator constrains the package to the prefix match of the version number. cute and precise, we love to see it πŸŽ€

πŸ”₯ the identity hash one

a constraint against a specific identity hash is specified with the >< operator. these constraints are generated by apk-add(8) when a package filename is added. you probably won't be hand-typing these and that's fine πŸ™ˆ

πŸ’€ the conflict exclamation mark

the optional ! in front of the name changes the dependency constraint to a conflict, and ensures that any package matching the specification is not installed. it's the "not you, bestie" of package management 🚫


🌈 EXAMPLES β€” let's break it down 🌈

  • busybox β€” installs busybox from the untagged repository from which it is available
  • busybox@edge β€” allows installation of busybox and it's dependencies from a repository tagged with "edge". tagged repositories will not be prioritized. if a version from an untagged repository is a better fit, it will be used πŸ‘€
  • !unwanted β€” prevents installation of unwanted as a dependency by creating a conflict. iconic blocking behavior πŸ’…
  • busybox=1.6.1 β€” install busybox version 1.6.1
  • busybox>1.6.1 β€” install a busybox version greater than 1.6.1
  • busybox>=1.6.1 β€” install a busybox version greater than or equal to 1.6.1
  • busybox<1.6.1 β€” install a busybox version less than 1.6.1
  • busybox~1.6 β€” install any busybox version starting with 1.6. examples of match: 1.6, 1.6.0_pre1, 1.6.0, 1.6.5, 1.6.9_p1 πŸ“
  • busybox>~1.6 β€” install a busybox version greater than or prefix match of 1.6
  • busybox<~1.6 β€” install a busybox version less than or prefix match of 1.6
  • busybox><Q12l/v/T0pPK3aQaUWmI9djiLpF+g= β€” install a busybox matching the specified identity hash. no cap, that's the actual string 🌟

and that's the whole page bestie, you ate that πŸ’– this was apk-world(5) from the File Formats Manual, dated 2026-11-02 β€” go forth and curate your world, mwah 🧚✨

πŸ“¦ where this page comes from