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β installsbusyboxfrom the untagged repository from which it is availablebusybox@edgeβ allows installation ofbusyboxand 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 ofunwantedas a dependency by creating a conflict. iconic blocking behavior πbusybox=1.6.1β installbusyboxversion1.6.1busybox>1.6.1β install abusyboxversion greater than1.6.1busybox>=1.6.1β install abusyboxversion greater than or equal to1.6.1busybox<1.6.1β install abusyboxversion less than1.6.1busybox~1.6β install anybusyboxversion starting with1.6. examples of match:1.6,1.6.0_pre1,1.6.0,1.6.5,1.6.9_p1πbusybox>~1.6β install abusyboxversion greater than or prefix match of1.6busybox<~1.6β install abusyboxversion less than or prefix match of1.6busybox><Q12l/v/T0pPK3aQaUWmI9djiLpF+g=β install abusyboxmatching 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
- arch rolling: apk-tools 3.0.9-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms