Include:Using Internet Repositories for apk-tools: Difference between revisions

From Alpine Linux
(updated the sample repositories file...)
(restored back the template and added a comment)
Line 1: Line 1:
<!--- Note that {{#expr:{{AlpineLatest}}}} will fail if there is a zero as the LSB like 3.10,3.20,3.30. So, when such releases are around, this page requires manual handling. -->
Edit the {{Path|/etc/apk/repositories}} file using any editor of your choice ({{Pkg|nano}} for instance).  
Edit the {{Path|/etc/apk/repositories}} file using any editor of your choice ({{Pkg|nano}} for instance).  
{{Cat|/etc/apk/repositories|http://dl-3.alpinelinux.org/alpine/v3.20/main
{{Cat|/etc/apk/repositories|http://dl-3.alpinelinux.org/alpine/{{#expr:{{AlpineLatest}}-0.01}}/main
http://dl-3.alpinelinux.org/alpine/v3.20/community}}
http://dl-3.alpinelinux.org/alpine/{{#expr:{{AlpineLatest}}-0.01}}/community}}
In the above file, to upgrade Alpine Linux from version 3.20 to 3.21, simply replace the number 3.20 by 3.21 in all the places:
In the above file, to upgrade Alpine Linux from version {{#expr:{{AlpineLatest}}-0.01}} to {{#expr:{{AlpineLatest}}}}, simply replace the number {{#expr:{{AlpineLatest}}-0.01}} by {{#expr:{{AlpineLatest}}}} in all the places:
{{Cat|/etc/apk/repositories|http://dl-3.alpinelinux.org/alpine/v3.21/main
{{Cat|/etc/apk/repositories|http://dl-3.alpinelinux.org/alpine/{{#expr:{{AlpineLatest}}}}/main
http://dl-3.alpinelinux.org/alpine/v3.21/community}}
http://dl-3.alpinelinux.org/alpine/{{#expr:{{AlpineLatest}}}}/community}}

Revision as of 10:23, 6 October 2025

Edit the /etc/apk/repositories file using any editor of your choice (nano for instance).

Contents of /etc/apk/repositories

http://dl-3.alpinelinux.org/alpine/3.21/main http://dl-3.alpinelinux.org/alpine/3.21/community

In the above file, to upgrade Alpine Linux from version 3.21 to 3.22, simply replace the number 3.21 by 3.22 in all the places:

Contents of /etc/apk/repositories

http://dl-3.alpinelinux.org/alpine/3.22/main http://dl-3.alpinelinux.org/alpine/3.22/community