SETUP-APKREPOS(8)
π SETUP-APKREPOS(8) π
okay bestie, this is the System Manager's Manual page for setup-apkrepos β and it's literally here to help you configure apk package repositories without the chaos. π
β¨
β¨ NAME β¨
setup-apkreposβ configure apk package repositories πΈ
π¦ SYNOPSIS π¦
the shapes this command can take, fr fr:
setup-apkrepos [-ch] [-f | -r | -1 | REPO...]
setup-apkrepos -o
π DESCRIPTION π
setup-apkrepos configures /etc/apk/repositories. It can add a mirror from the Alpine mirror list, write explicit repository URLs, enable matching community repositories, or prompt interactively. all the repo setup energy in one little script π«Ά
When a mirror is selected from the mirror list, repositories are written for the current Alpine release. The release is inferred from an existing main repository or from /etc/alpine-release; development and unknown versions fall back to edge. π§
After changing repositories, the script runs apk update. β¨
π OPTIONS π
okay here's the full flag lineup, no cap β every single one:
-1β Add the first mirror from the mirror list, normally the CDN mirror, and do not prompt. π-cβ Enable the community repository when adding a mirror. Without this option, the generated community repository line is commented out. π¬-fβ Find and add the fastest mirror from the mirror list, and do not prompt. π₯-hβ Display usage information and exit. π«‘-oβ Only enable a community repository for every main repository already configured in/etc/apk/repositories. π-rβ Add a random mirror from the mirror list, and do not prompt. π²REPO...β Replace/etc/apk/repositorieswith the specified repository lines. π
big rules, bestie:
-ocannot be used with-c,-f,-r, or-1. π«-f,-r, and-1are mutually exclusive. π
π INTERACTIVE MODE π
Without non-interactive options or explicit REPO arguments, the script prompts for a setup method. The prompt accepts:
fβ Find and use the fastest mirror. β‘sβ Show the mirror list. πrβ Use a random mirror. π²eβ Edit/etc/apk/repositorieswithEDITORorvi. βοΈcβ Toggle whether generated mirror entries enable the community repository. πskipβ Exit without changing repositories. πͺnumberβ Add the numbered mirror from the mirror list. π’URL or pathβ Add the specified repository URL or absolute path. π
Adding c after answers such as f c or r c enables community repositories. periodt. π
π§ ENVIRONMENT π§
MIRRORS_URLβ URL used to fetch the Alpine mirror list. The default ishttps://mirrors.alpinelinux.org/mirrors.txt. πMIRRORSβ Whitespace-separated mirror list. If set,setup-apkreposuses this list instead of fetchingMIRRORS_URL. πAPKREPO_DEFAULT_ANSWERβ Default answer used by the interactive prompt. π¬EDITORβ Editor used by the interactive edit command. Defaults tovi. ποΈ
β EXIT STATUS β
0β Success. πnon-zeroβ An error occurred. π
π FILES π
/etc/apk/repositoriesβ apk repository configuration file. π/etc/alpine-releaseβ Alpine release file used to choose the repository release. π·οΈ
π₯ SEE ALSO π₯
check out apk(8) and setup-alpine(8) β besties for sure. π
π AUTHORS π
shoutout to Natanael Copa <ncopa@alpinelinux.org> and others. π«Ά
mwah π source/version: Alpine Linux; date: 2026-06-09. periodt. πβ¨
π¦ where this page comes from
- alpine 3.24: alpine-conf-doc 3.22.0-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms