apk-repositories(5)
π NAME π
Okay bestie, this is apk-repositories(5) from the File Formats Manual β and itβs all about the absolute icons:
/etc/apk/repositories/etc/apk/repositories.d/*.list/lib/apk/repositories.d/*.list
Itβs literally the list of package repositories. Slay.
β¨ DESCRIPTION β¨
apk(8) loads repository definitions from the files above. The repositories file gets loaded first. Then the repositories.d paths are processed if the --repositories-file option was not used. Those directories are enumerated in the above mentioned order. Once a .list file of a given name is seen, any file of the same name in subsequent directories is ignored. No cap.
π FILE FORMAT π
Each line follows one of these syntaxes:
# comment
set [-default] key=value
ndx [@tag] url
[v2|v3] [@tag] url [component...]
# commentβ a comment line, and it gets ignored. Iconic.set [-default] key=valueβ set the variable namedkeyto the givenvalue.- The
keyis limited to letters, numbers, and the underscore (_) character, and must start with a letter.APK_-prefixed variable names are reserved for built-in variables and cannot be defined by the user. - A variable expansion is performed on the value before assignment.
- If
-defaultis specified, thekeyvalue is not changed if it already exists. - Currently the following variables are defined:
APK_ARCH, the primary architecture of the database.
- The
ndx [@tag] urland[v2|v3] [@tag] url [component...]β repository declarations. If a repository declaration omits the type field, it defaults tov2(orndxifurlends with.adbor.tar.gz). If the format isv3or thendxfilename ends with.adb, a v3 format index file is required.- The optional
@tagcan be present to indicate that the repository should not be used by default. Refer toapk-world(5)on how to enable installation of packages from tagged repositories. - A variable expansion is performed on the
urlandcomponentportions individually at the time of parsing the line. - The
urlrefers to an index file or a repository path. Currently supported schemes are:http://https://file://- absolute filesystem path (must start with
/)
- The
componentlist specifies a list of repository components. If specified, the line is expanded to multiple URLs: one for each component, and the component is appended to theurl. Specifyingcomponentwithndxtype is not valid.
- The optional
πΈ EXAMPLES πΈ
To define a distribution provided repository list, the distribution can ship e.g. /lib/apk/repositories.d/distribution.list with the contents:
set -default distro_mirror=https://example.com/distro
v3 ${distro_mirror} main community
In /etc/apk/repositories.d/00-vars.list the mirror can be overridden with:
set distro_mirror=https://mirror.example.com/distro
π¦ REPOSITORY LAYOUT π¦
If the type is ndx, the layout and path resolution is as follows:
urlis a URL to the index filebase_urlisurlwith the last component stripped off- default package path:
$base_url/$name-$version.apk
Otherwise the type is one of the repository types, and the path resolution works as follows:
urlis thebase_urlto the repository- index (
v3) is at$base_url/$arch/Packages.adb - index (
v2) is at$base_url/$arch/APKINDEX.tar.gz - default package path:
$base_url/$arch/$name-$version.apk
If the index file has a pkgname-spec set, it is used to construct the package path. Otherwise the default package path based on above rules is used.
π₯ CREATING INDEXES AND REPOSITORIES π₯
See apk-mkndx(8) on how to create index files and apk-adbsign(8) on modifying signatures.
For the legacy index format refer to apk-index(8) for index files, abuild-keygen(1) for information about generating keys, abuild-sign(1) for information about using these keys to sign files.
apk-verify(8) can verify both new and old style index and package files. Periodt.
π CLIENT INDEX UPDATING π
apk(8) fetches and stores the index for each repository at a local cache in /etc/apk/cache or /var/cache/apk. Refer to apk-cache(5) for more details.
Refer to apk-keys(5) on how the client needs to be configured for verifying the index signatures.
Okay thatβs the whole vibe check π β this was apk-repositories(5), dated 2026-11-02. Manual page/source: apk-repositories(5). Now go forth and slay those repos, bestie π«Άβ¨
π¦ 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