.\" Generated by scdoc 1.11.5 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "apk\-repositories" "5" "2026\-08\-31" .PP .SH NAME .PP \fB/etc/apk/repositories\fR .br \fB/etc/apk/repositories.\&d/*.\&list\fR .br \fB/lib/apk/repositories.\&d/*.\&list\fR .br list of package repositories .PP .SH DESCRIPTION .PP \fBapk\fR(8) loads repository definitions from the above mentioned files.\& .PP The \fBrepositories\fR file is first loaded.\& The \fBrepositories.\&d\fR paths are then processed if \fB\-\-repositories\-file\fR option was not used.\& The directories are enumerated in the above mentioned order.\& Once a \fB.\&list\fR file of given name is seen, any file of the same name in subsequent directories is ignored.\& .PP .SH FILE FORMAT .PP Each line follows one of the following syntax: .PP \fB# comment\fR .RS 4 A comment line which is ignored.\& .PP .RE \fBset [\-default] key=value\fR .RS 4 Set the variable named \fBkey\fR to given \fBvalue\fR.\& .PP The \fBkey\fR is limited to letters, numbers and the underscore (_) character, and must start with a letter.\& The \fBAPK_\fR prefixed variable names are reserved for built\-in variables and cannot be defined by the user.\& .PP A variable expansion is performed on the \fBvalue\fR before assignment.\& .PP If the option \fB\-default\fR is specified, the \fBkey\fR value is not changed if it already exists.\& .PP Currently the following variables are defined: .RS 4 .PD 0 .IP \(bu 4 \fBAPK_ARCH\fR, the primary architecture of the database .PD .PP .RE .RE \fBndx [@tag] url\fR .br \fB[v2|v3] [@tag] url [component.\&.\&.\&]\fR .RS 4 If a repository declaration omits the type field, it defaults to \fBv2\fR (or \fBndx\fR if \fBurl\fR ends with \fB.\&adb\fR or \fB.\&tar.\&gz\fR).\& If the format is \fBv3\fR or the \fBndx\fR filename ends with \fB.\&adb\fR a v3 format index file required.\& .PP The optional \fB@tag\fR can be present to indicate that the repository should not be used by default.\& Refer to \fBapk\-world\fR(5) on how to enable installation of packages from tagged repositories.\& .PP A variable expansion is performed on the \fBurl\fR and \fBcomponent\fR portions individually at the time of parsing the line.\& .PP The \fBurl\fR refers to an index file or a repository path.\& Currently supported schemes are: .RS 4 .PD 0 .IP \(bu 4 \fIhttp://\fR .IP \(bu 4 \fIhttps://\fR .IP \(bu 4 \fIfile://\fR .IP \(bu 4 absolute filesystem path (must start with `/`) .PD .PP .RE The \fBcomponent\fR list specifies a list of repository components.\& If specified, the line is expanded to multiple URLs: one for each component, and the \fBcomponent\fR is appended to the \fBurl\fR.\& Specifying \fBcomponent\fR with \fBndx\fR type is not valid.\& .PP .RE .SH EXAMPLES .PP To define a distribution provided repository list, the distribution can ship e.\&g \fB/lib/apk/repositories.\&d/distribution.\&list\fR with the contents: .PP .RS 4 set \-default distro_mirror=https://example.\&com/distro .br v3 ${distro_mirror} main community .PP .RE In \fB/etc/apk/repositories.\&d/00\-vars.\&list\fR the mirror can be overridden with: .PP .RS 4 set distro_mirror=https://mirror.\&example.\&com/distro .PP .RE .SH REPOSITORY LAYOUT .PP If the \fBtype\fR is \fBndx\fR, the layout and path resolution is as follows: .RS 4 .PD 0 .IP \(bu 4 \fBurl\fR is a URL to the index file .IP \(bu 4 \fBbase_url\fR is \fBurl\fR with last component stripped off .IP \(bu 4 default package path: \fB$base_url/$name\-$version.\&apk\fR .PD .PP .RE Otherwise the \fBtype\fR is one of the repository types, and the path resolution works as follows: .RS 4 .PD 0 .IP \(bu 4 \fBurl\fR is the \fBbase_url\fR to the repository .IP \(bu 4 index (\fBv3\fR) is at \fB$base_url/$arch/Packages.\&adb\fR .IP \(bu 4 index (\fBv2\fR) is at \fB$base_url/$arch/APKINDEX.\&tar.\&gz\fR .IP \(bu 4 default package path: \fB$base_url/$arch/$name\-$version.\&apk\fR .PD .PP .RE If the index file has a \fBpkgname\-spec\fR set, it is used to construct the package path.\& Otherwise the default package path based on above rules is used.\& .PP .SH CREATING INDEXES AND REPOSITORIES .PP See \fBapk\-mkndx\fR(8) on how to create index files and \fBapk\-adbsign\fR(8) on modifying signatures.\& .PP For the legacy index format refer to \fBapk\-index\fR(8) for index files, \fBabuild\-keygen\fR(1) for information about generating keys, \fBabuild\-sign\fR(1) for information about using these keys to sign files.\& .PP \fBapk\-verify\fR(8) can verify both new and old style index and package files.\& .PP .SH CLIENT INDEX UPDATING .PP \fBapk\fR(8) fetches and stores the index for each repository at a local cache in \fB/etc/apk/cache\fR or \fB/var/cache/apk\fR.\& Refer to \fBapk\-cache\fR(5) for more details.\& .PP Refer to \fBapk\-keys\fR(5) on how the client needs to be configured for verifying the index signatures.\&