<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Franklin+Yu</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Franklin+Yu"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Franklin_Yu"/>
	<updated>2026-05-07T04:30:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Include:Upgrading_to_latest_release&amp;diff=21117</id>
		<title>Include:Upgrading to latest release</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Include:Upgrading_to_latest_release&amp;diff=21117"/>
		<updated>2021-12-25T08:58:48Z</updated>

		<summary type="html">&lt;p&gt;Franklin Yu: remove redundant newline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Repository Settings ====&lt;br /&gt;
&lt;br /&gt;
First thing is to to edit or check the {{Path|/etc/apk/repositories}} file.&lt;br /&gt;
&lt;br /&gt;
Besides doing it manually (see below) this may be done using one of the following shortcuts.&lt;br /&gt;
:* Launching the corresponding Alpine setup script, {{Cmd|setup-apkrepos}} and pressing {{Key|e}} to edit {{Path|/etc/apk/repositories}}. Then editing the repository lines to reflect the new version number.&lt;br /&gt;
:* Or, use a one-line command to edit all version numbers in the file &amp;quot;in place&amp;quot;. Here&#039;s how you&#039;d change &amp;lt;var&amp;gt;v2.5&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;v2.6&amp;lt;/var&amp;gt;: {{Cmd|sed -i -e &#039;s/&amp;lt;var&amp;gt;v2\.5&amp;lt;/var&amp;gt;/&amp;lt;var&amp;gt;v2.6&amp;lt;/var&amp;gt;/g&#039; /etc/apk/repositories}}&lt;br /&gt;
&lt;br /&gt;
Note, subsequent manual changes of the version numbers in {{Path|/etc/apk/repositories}} may be avoided for future release upgrades by having the repository lines refer to &amp;quot;latest-stable&amp;quot; instead of an absolute value:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|http://dl-3.alpinelinux.org/alpine/latest-stable/main&lt;br /&gt;
http://dl-3.alpinelinux.org/alpine/latest-stable/community}}&lt;br /&gt;
&lt;br /&gt;
However, beware of initiating unexpected release upgrades.&lt;br /&gt;
&lt;br /&gt;
Manual editing of {{Path|/etc/apk/repositories}}:&lt;br /&gt;
&lt;br /&gt;
{{:Include:Using_Internet_Repositories_for_apk-tools}}&lt;br /&gt;
&lt;br /&gt;
==== Upgrading packages ====&lt;br /&gt;
&lt;br /&gt;
At times it is required to first upgrade just the Alpine Linux Package Manager itself to the latest available version, before upgrading any other package. This was the case, for example, when upgrading from a version of Alpine before 2.3.0_rc1. But  simply always doing so shounld&#039;t hurt, either:&lt;br /&gt;
{{Cmd|apk add --upgrade apk-tools}}&lt;br /&gt;
&lt;br /&gt;
Next, to upgrade all installed packages:&lt;br /&gt;
{{Cmd|apk upgrade --available}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--available&amp;lt;/code&amp;gt; switch is used to force all packages to be upgraded, even if they have the same version numbers. Sometimes changes in uClibc require doing this.&lt;br /&gt;
&lt;br /&gt;
{{Note|All services that have been upgraded need to be restarted, to begin using the upgraded version. If the kernel is upgraded, it&#039;s required to reboot to begin using the upgraded version:&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Franklin Yu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=21116</id>
		<title>Upgrading Alpine Linux to a new release branch</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=21116"/>
		<updated>2021-12-25T08:55:55Z</updated>

		<summary type="html">&lt;p&gt;Franklin Yu: /* Upgrading to latest release */ remove unnecessary newline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page covers upgrading to newer releases.&lt;br /&gt;
&lt;br /&gt;
Doing regular security updates with the package manager is shown at [[Alpine_Linux_package_management#Upgrade_a_Running_System|Upgrading a running system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before actually upgrading your system, make sure that you have a backup of your important data.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading an Alpine Linux Hard-disk installation ==&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from older versions ===&lt;br /&gt;
&lt;br /&gt;
In case an older version needs to be upgraded, i.e. not just upgrading from the last release to the subsequent version as covered by the individual release notes, also check [[Upgrading from older versions]] for potential specifically required upgrade steps.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to latest release ===&lt;br /&gt;
&lt;br /&gt;
When Alpine Linux is installed in &#039;&#039;&#039;sys&#039;&#039;&#039; mode, e.g. on a hard drive, upgrading to the next stable version should be a straightforward package manager operation. However, for specific info always refer to the appropriate release notes.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to Edge ===&lt;br /&gt;
{{:Include:Upgrading to Edge}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on CD ==&lt;br /&gt;
&lt;br /&gt;
=== Boot media === &lt;br /&gt;
&lt;br /&gt;
If the boot media being used (such as a CD, for example) is separate from the media used to store the configuration information, simply download the latest ISO, and replace the boot media contents with the contents of the latest ISO.&lt;br /&gt;
&lt;br /&gt;
If booting from a CD, this would simply mean replacing the CD with a CD made from the new image and rebooting the Alpine Linux box. &lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
If you have locally installed and configured additional packages using [[How_to_enable_APK_caching|APK caching]] you should also perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Backup the local configuration prior to upgrading.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
After upgrading the packages, save the upgraded configuration changes.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on other removable media (such as CF/USB) ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are for run-from-RAM Alpine installations running on Compact Flash or USB media. Updating your repositories using [[#Upgrading_an_Alpine_Linux_Hard-disk_installation|the procedures detailed above]], then running:&lt;br /&gt;
{{Cmd|apk upgrade --update-cache --available}}&lt;br /&gt;
will suffice for some purposes. (If you want the new packages to be used after a reboot, you should [[How_to_enable_APK_caching|enable APK caching]].)&lt;br /&gt;
&lt;br /&gt;
However, this is not an adequate general solution because it won&#039;t honor any kernel upgrades and the like. For the general solution, you&#039;ll need to upgrade your boot medium (Compact Flash or USB). That is what the following steps describe how to do.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading_Alpine_environmentvars}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrade Operating System ===&lt;br /&gt;
&lt;br /&gt;
Start by checking that you have enough space on your media. For a &#039;&#039;&#039;standard&#039;&#039;&#039; Alpine image, you need at least 400MB available space.&lt;br /&gt;
{{Cmd|df -h {{!}} grep &amp;quot;Filesystem\{{!}}$LBU_MEDIA&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
==== Download and verify new release ====&lt;br /&gt;
&lt;br /&gt;
Make sure the media that holds your Alpine system is mounted readwrite.&lt;br /&gt;
{{Cmd|mount -oremount,rw /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 2.2.3 or newer&#039;&#039;&#039;: Download the latest release, {{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/&amp;lt;arch&amp;gt;/&amp;lt;image&amp;gt;.iso}} and then use the following command to mount and copy files as needed for you: {{Cmd|setup-bootable -u alpine-extended-&amp;lt;version&amp;gt;-&amp;lt;arch&amp;gt;.iso /media/$LBU_MEDIA}} Once the command completes, proceed to the [[#Save changes|Save changes]] section.&lt;br /&gt;
&lt;br /&gt;
==== For older versions of Alpine ====&lt;br /&gt;
Start downloading a new &#039;.iso&#039; and a &#039;.sha1&#039; file &lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA&lt;br /&gt;
wget -c {{#latestalp:alpine|url}}&lt;br /&gt;
wget {{#latestalp:alpine|url}}.sha1}}&lt;br /&gt;
&lt;br /&gt;
Check integrity of the downloaded files &#039;&#039;(it might take some time)&#039;&#039;:&lt;br /&gt;
{{Cmd|sha1sum -c {{#latestalp:alpine|file}}.sha1}}&lt;br /&gt;
&#039;&#039;The output of the above command should say &#039;OK&#039;.&amp;lt;BR&amp;gt;&#039;&#039;&lt;br /&gt;
&#039;&#039;If says &#039;FAILED&#039;, delete the iso file and download it again.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 1.10.4 or newer&#039;&#039;&#039;: there is a tool &#039;&#039;setup-bootable&#039;&#039; that will mount and copy the image you just downloaded to your boot medium. With this tool simply do: {{Cmd|setup-bootable -u {{#latestalp:alpine|file}} /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
[[Upgrading from older versions#Upgrading_a_removable_medium_from_Alpine_before_1.10.4|Instructions for older versions of Alpine]] are located elsewhere.&lt;br /&gt;
&lt;br /&gt;
=== Save changes ===&lt;br /&gt;
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up prior to doing this upgrade).&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
=== Load new kernel ===&lt;br /&gt;
In most cases you will need to reboot Alpine Linux (especially if there are changes in the kernel):&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you know what you are doing, you might not need to reboot. But make sure that all services affected by the upgrade are restarted.}}&lt;br /&gt;
&lt;br /&gt;
=== Update to latest kernel on armhf (eg. Raspberry Pi 0 or 1) ===&lt;br /&gt;
On Alpine 3.X and newer, kernel is not upgraded when using &amp;lt;code&amp;gt;apk upgrade&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setup-bootable&amp;lt;/code&amp;gt; does not work properly.&lt;br /&gt;
&lt;br /&gt;
If you want to upgrade your kernel, you will need to get it from the latest release, but first you must have and run :&lt;br /&gt;
{{Cmd|apk update; apk version -l &#039;&amp;lt;&#039;;&lt;br /&gt;
apk upgrade;&lt;br /&gt;
lbu ci;}}&lt;br /&gt;
&lt;br /&gt;
So now all your packages are upgraded, you can upgrade your kernel.&lt;br /&gt;
&lt;br /&gt;
1. We need to get some variables :&lt;br /&gt;
{{Cmd|. /etc/os-release;&lt;br /&gt;
. /etc/lbu/lbu.conf;&lt;br /&gt;
ARCH&amp;amp;#61;$(cat /etc/apk/arch);}}&lt;br /&gt;
&lt;br /&gt;
2. You &#039;&#039;&#039;must&#039;&#039;&#039; verify if they are correctly set, using this :&lt;br /&gt;
{{Cmd|echo &amp;quot;alpine version : $VERSION_ID&amp;quot;;&lt;br /&gt;
echo &amp;quot;lbu media : $LBU_MEDIA&amp;quot;;&lt;br /&gt;
echo &amp;quot;arch : $ARCH&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
3. And it will output something like this (if not, do not continue this process) :&lt;br /&gt;
{{Cmd|alpine version : 3.13.5&lt;br /&gt;
lbu media : mmcblk0p1&lt;br /&gt;
arch : armhf}}&lt;br /&gt;
&lt;br /&gt;
4. Then you can run this script (WARNING : config.txt will be overwritten!) :&lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA;&lt;br /&gt;
mount -oremount,rw /media/$LBU_MEDIA;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
sha256sum -c *.sha256;&lt;br /&gt;
tar xzf alpine-rpi-$VERSION_ID-$ARCH.tar.gz;&lt;br /&gt;
rm alpine-rpi-$VERSION_ID-$ARCH.tar.gz alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256;&lt;br /&gt;
sync;&lt;br /&gt;
reboot;}}&lt;br /&gt;
&lt;br /&gt;
5. Test-it !&lt;br /&gt;
{{Cmd|uname -a}}&lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
This is done just as at [[#Update local package installations]], above.&lt;br /&gt;
&lt;br /&gt;
== Updating a USB/CF diskless install without setup-bootable ==&lt;br /&gt;
It is possible to update a diskless install of Alpine from another system, or without using the setup-bootable script. This was tested for the 3.13 to the 3.14 upgrade on a Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
Before starting, update /etc/apk/repositories file to retrieve packages for the new release. Then update all packages with:&lt;br /&gt;
{{Cmd|apk update &amp;amp;&amp;amp; apk upgrade -i -a --update-cache}}&lt;br /&gt;
&lt;br /&gt;
We can then use update-conf to check for changes to configurations from the new packages.&lt;br /&gt;
{{Cmd|# check apk-new config changes&lt;br /&gt;
update-conf -a -l&lt;br /&gt;
update-conf -a&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We now need to prepare to update the kernel and boot materials. To do this, we stop the modloop (which is the loopback mount providing kernel modules) and remount the SD media as read/write.&lt;br /&gt;
&lt;br /&gt;
We can also shutdown the system, eject the media, and perform the next steps on another machine (if so, skip this command block)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/modloop stop&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
cd /media/mmcblk0p1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
At this point, remove all files from the SD media &#039;&#039;&#039;except for /cache, *.apkvol.tar.gz, usercfg.txt, and config.txt&#039;&#039;&#039; Rename config.txt to config.txt.bak temporarily, as extracting the new tar file will overwrite the file.&lt;br /&gt;
&lt;br /&gt;
We can now download the new release and extract it. This example is for an Alpine Raspberry Pi release, so feel free to adjust the URLs for your system. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz.sha256&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz&lt;br /&gt;
sha256sum -c *.sha256&lt;br /&gt;
tar zxf *-aarch64.tar.gz &amp;amp;&amp;amp; sync&lt;br /&gt;
rm alpine-rpi-*&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Restore the original config.txt:&lt;br /&gt;
{{Cmd|mv config.txt.bak config.txt}}&lt;br /&gt;
&lt;br /&gt;
Update the persistent storage using lbu:&lt;br /&gt;
{{Cmd|lbu ci -d}}&lt;br /&gt;
&lt;br /&gt;
We can now reboot, and this should boot into the new kernel. Once this is done, we can clean up and re-download apk caches:&lt;br /&gt;
{{Cmd|mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
rm /media/mmcblk0p1/cache/*&lt;br /&gt;
sync &amp;amp;&amp;amp; apk update &amp;amp;&amp;amp; apk cache -v download&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,ro&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Franklin Yu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&amp;diff=21115</id>
		<title>Alpine Package Keeper</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&amp;diff=21115"/>
		<updated>2021-12-25T08:52:44Z</updated>

		<summary type="html">&lt;p&gt;Franklin Yu: /* Add a Package */ switch to the CDN repository&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--For searching: apk, APK--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TOC right}}&lt;br /&gt;
&lt;br /&gt;
Because Alpine Linux is designed to run from RAM, package management involves two phases:&lt;br /&gt;
* Installing / Upgrading / Deleting packages on a running system.&lt;br /&gt;
* Restoring a system to a previously configured state (e.g. after reboot), including all previously installed packages and locally modified configuration files. &#039;&#039;&#039;(RAM-Based Installs Only)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;apk&#039;&#039;&#039; is the tool used to install, upgrade, or delete software on a running system.&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;lbu&#039;&#039;&#039; is the tool used to capture the data necessary to restore a system to a previously configured state.&lt;br /&gt;
&lt;br /&gt;
This page documents the [https://git.alpinelinux.org/apk-tools/ apk tool] - See the [[Alpine_local_backup|Alpine Local Backup page]] for the lbu tool.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;apk&#039;&#039;&#039; tool supports the following operations:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[#Add a Package|add]] &lt;br /&gt;
| Add new packages or upgrade packages to the running system&lt;br /&gt;
|-&lt;br /&gt;
| [[#Remove a Package|del]]&lt;br /&gt;
| Delete packages from the running system&lt;br /&gt;
|-&lt;br /&gt;
| fix &lt;br /&gt;
| Attempt to repair or upgrade an installed package &lt;br /&gt;
|-&lt;br /&gt;
| [[#Update the Package list|update]] &lt;br /&gt;
| Update the index of available packages&lt;br /&gt;
|-&lt;br /&gt;
| [[#Information on Packages|info]]&lt;br /&gt;
| Prints information about installed or available packages&lt;br /&gt;
|-&lt;br /&gt;
| [[#Search for Packages|search]] &lt;br /&gt;
| Search for packages or descriptions with wildcard patterns&lt;br /&gt;
|-&lt;br /&gt;
| [[#Upgrade a Running System|upgrade]]&lt;br /&gt;
| Upgrade the currently installed packages&lt;br /&gt;
|-&lt;br /&gt;
| [[#Cache maintenance|cache]]&lt;br /&gt;
| Maintenance operations for locally cached package repository&lt;br /&gt;
|-&lt;br /&gt;
| version &lt;br /&gt;
| Compare version differences between installed and available packages&lt;br /&gt;
|-&lt;br /&gt;
| index &lt;br /&gt;
| create a repository index from a list of packages&lt;br /&gt;
|-&lt;br /&gt;
| fetch &lt;br /&gt;
| download (but not install) packages&lt;br /&gt;
|-&lt;br /&gt;
| audit &lt;br /&gt;
| List changes to the file system from pristine package install state&lt;br /&gt;
|-&lt;br /&gt;
| verify &lt;br /&gt;
| Verify a package signature&lt;br /&gt;
|- &lt;br /&gt;
| dot&lt;br /&gt;
| Create a [http://graphviz.org/ graphviz] graph description for a given package&lt;br /&gt;
|- &lt;br /&gt;
| [[#apk_policy|policy]]&lt;br /&gt;
| Display the repository that updates a given package, plus repositories that also offer the package&lt;br /&gt;
|- &lt;br /&gt;
| stats &lt;br /&gt;
| Display statistics, including number of packages installed and available, number of directories and files, etc.&lt;br /&gt;
|- &lt;br /&gt;
| manifest&lt;br /&gt;
| Display checksums for files contained in a given package&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Packages and Repositories =&lt;br /&gt;
&lt;br /&gt;
Software packages for Alpine Linux are digitally signed tar.gz archives containing programs, configuration files, and dependency metadata. They have the extension &amp;lt;code&amp;gt;.apk&amp;lt;/code&amp;gt;, and are often called &amp;quot;a-packs&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The packages are stored in one or more &#039;&#039;repositories&#039;&#039;. A repository is simply a directory with a collection of *.apk files.  The directory must include a special index file, named {{Path|APKINDEX.tar.gz}} to be considered a repository.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;apk&#039;&#039;&#039; utility can install packages from multiple repositories.  The list of repositories to check is stored in {{Path|/etc/apk/repositories}}, one repository per line. If you booted from a USB stick ({{Path|/media/sda1}}) or CD-ROM ({{Path|/media/cdrom}}), your repository file probably looks something like this:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/apk/repositories|/media/sda1/apks/}}&lt;br /&gt;
&lt;br /&gt;
In addition to local repositories, the &#039;&#039;&#039;apk&#039;&#039;&#039; utility uses &#039;&#039;&#039;busybox wget&#039;&#039;&#039; to fetch packages using &#039;&#039;http:&#039;&#039;, &#039;&#039;https:&#039;&#039; or &#039;&#039;ftp:&#039;&#039; protocols. The following is a valid repository file:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/apk/repositories|&lt;br /&gt;
/media/sda1/apks&lt;br /&gt;
http://dl-3.alpinelinux.org/alpine/v2.6/main&lt;br /&gt;
https://dl-3.alpinelinux.org/alpine/v2.6/main&lt;br /&gt;
ftp://dl-3.alpinelinux.org/alpine/v2.6/main&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note|  A list of public repositories is in [https://mirrors.alpinelinux.org/ mirrors.alpinelinux.org].  Accepted protocols vary.}}&lt;br /&gt;
&lt;br /&gt;
== Repository pinning ==&lt;br /&gt;
&lt;br /&gt;
You can specify additional &amp;quot;tagged&amp;quot; repositories in {{Path|/etc/apk/repositories}}:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/apk/repositories|&lt;br /&gt;
http://nl.alpinelinux.org/alpine/v3.7/main&lt;br /&gt;
http://nl.alpinelinux.org/alpine/v3.7/community&lt;br /&gt;
@edge http://nl.alpinelinux.org/alpine/edge/main&lt;br /&gt;
@edgecommunity http://nl.alpinelinux.org/alpine/edge/community&lt;br /&gt;
@testing http://nl.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
After which you can &amp;quot;pin&amp;quot; dependencies to these tags using:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add stableapp newapp@edge bleedingapp@testing}}&lt;br /&gt;
&lt;br /&gt;
Apk will now by default only use the untagged repositories, but adding a tag to specific package:&lt;br /&gt;
&lt;br /&gt;
1. will prefer the repository with that tag for the named package, even if a later version of the package is available in another repository&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;allows&#039;&#039; pulling in dependencies for the tagged package from the tagged repository (though it &#039;&#039;prefers&#039;&#039; to use untagged repositories to satisfy dependencies if possible)&lt;br /&gt;
&lt;br /&gt;
== Commandline repository options ==&lt;br /&gt;
&lt;br /&gt;
By default, the &#039;&#039;&#039;apk&#039;&#039;&#039; utility will use the system repositories for all operations. This behavior can be overridden by the following options:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| --repositories-file REPOFILE&lt;br /&gt;
| Override the system repositories by specifying a repositories file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;nowiki&amp;gt;-X|--repository REPO&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
| Specify a supplemental repository that will be used in addition to the system repositories. This option can be provided multiple times.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Update the Package list =&lt;br /&gt;
&lt;br /&gt;
Remote repositories change as packages are added and upgraded.   To get the latest list of available packages, use the &#039;&#039;update&#039;&#039; command.  The command downloads the {{Path|APKINDEX.tar.gz}} from each repository and stores it in the local cache, typically {{Path|/var/cache/apk/}}, {{Path|/var/lib/apk/}} or {{Path|/etc/apk/cache/}}.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk update}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
fetch http://dl-3.alpinelinux.org/alpine/v2.1/main/APKINDEX.tar.gz&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Adding the &amp;lt;code&amp;gt;--update-cache&amp;lt;/code&amp;gt;, or for short &amp;lt;code&amp;gt;-U&amp;lt;/code&amp;gt; switch to another apk command, as in &amp;lt;code&amp;gt;apk --update-cache upgrade&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;apk -U add ...&amp;lt;/code&amp;gt;, the command has the same effect as first running &amp;lt;code&amp;gt;apk update&amp;lt;/code&amp;gt; before the other apk command.&lt;br /&gt;
&lt;br /&gt;
{{Tip|With remote repositories, it is a good idea to always do an &#039;&#039;&#039;update&#039;&#039;&#039; right &#039;&#039;&#039;before&#039;&#039;&#039; doing an &#039;&#039;&#039;upgrade or add&#039;&#039;&#039; command. That way the command will install the latest available packages.}}&lt;br /&gt;
&lt;br /&gt;
= Add a Package =&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;add&#039;&#039;&#039; to install packages from a repository. Any necessary dependencies are also installed. If you have multiple repositories, the &#039;&#039;&#039;add&#039;&#039;&#039; command installs the newest package.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add openssh&lt;br /&gt;
apk add openssh openntp vim}}&lt;br /&gt;
&lt;br /&gt;
If you only have the main repository enabled in your configuration, apk will not include packages from the other repositories. To install a package from the edge/testing repository without changing your repository configuration file, use the command below. This will tell apk to use that particular repository.&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add cherokee --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Be careful when using third-party or the testing repository. Your system can go down.}}&lt;br /&gt;
&lt;br /&gt;
= Add a local Package =&lt;br /&gt;
&lt;br /&gt;
To install a locally available apk package, for example if this device has no internet access but you can upload apk packages directly to it, use the &#039;&#039;&#039;--allow-untrusted&#039;&#039;&#039; flag:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add --allow-untrusted /path/to/file.apk}}&lt;br /&gt;
&lt;br /&gt;
Note that multiple packages can be given.  When installing a local package, all dependencies should also be specified.  For example:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add --allow-untrusted /var/tig-2.2-r0.apk /var/git-2.11.1-20.apk}}&lt;br /&gt;
&lt;br /&gt;
= Remove a Package  =&lt;br /&gt;
Use &#039;&#039;&#039;del&#039;&#039;&#039; to remove a package (and dependencies that are no longer needed.)  &lt;br /&gt;
&lt;br /&gt;
{{cmd|apk del openssh&lt;br /&gt;
apk del openssh openntp vim}}&lt;br /&gt;
&lt;br /&gt;
= Upgrade a Running System =&lt;br /&gt;
&lt;br /&gt;
=== Packages in general ===&lt;br /&gt;
&lt;br /&gt;
To get the latest security upgrades and bugfixes available for the &#039;&#039;installed&#039;&#039; packages of a running system, first &#039;&#039;&#039;update&#039;&#039;&#039; the list of available packages and then &#039;&#039;&#039;upgrade&#039;&#039;&#039; the installed packages:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk update&lt;br /&gt;
apk upgrade&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Or, combining the same into one single command:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk -U upgrade&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Here is an example, showing the procedure on a system that has several additional [[#Repository_pinning|repositories pinned]]:&lt;br /&gt;
&lt;br /&gt;
 # apk update&lt;br /&gt;
 fetch http://dl-3.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz&lt;br /&gt;
 fetch http://dl-3.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz&lt;br /&gt;
 fetch http://dl-3.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz&lt;br /&gt;
 fetch http://dl-3.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz&lt;br /&gt;
 fetch http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz&lt;br /&gt;
 v3.6.2-191-gf98d79930f [http://dl-3.alpinelinux.org/alpine/v3.6/main]&lt;br /&gt;
 v3.6.2-190-ga5d68c47df [http://dl-3.alpinelinux.org/alpine/v3.6/community]&lt;br /&gt;
 v3.6.0-4618-g0bf77c9821 [http://dl-3.alpinelinux.org/alpine/edge/main]&lt;br /&gt;
 v3.6.0-4605-g85ed51dd83 [http://dl-3.alpinelinux.org/alpine/edge/community]&lt;br /&gt;
 v3.6.0-4624-g11f1b9c8ab [http://dl-3.alpinelinux.org/alpine/edge/testing]&lt;br /&gt;
 OK: 20118 distinct packages available&lt;br /&gt;
 &lt;br /&gt;
 # apk upgrade&lt;br /&gt;
 (1/2) Upgrading extra-cmake-modules@testing (5.38.0-r0 -&amp;gt; 5.39.0-r0)&lt;br /&gt;
 (2/2) Upgrading extra-cmake-modules-doc@testing (5.38.0-r0 -&amp;gt; 5.39.0-r0)&lt;br /&gt;
 Executing mdocml-apropos-1.14.1-r0.trigger&lt;br /&gt;
 OK: 2635 MiB in 803 packages&lt;br /&gt;
&lt;br /&gt;
To upgrade only &#039;&#039;specific&#039;&#039; packages, use the &#039;&#039;-u&#039;&#039; or &#039;&#039;--upgrade&#039;&#039; option of the &#039;&#039;&#039;add&#039;&#039;&#039; command:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk update&lt;br /&gt;
apk add --upgrade busybox &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To enable unattended, automatic upgrades of packages, see the {{pkg|apk-autoupdate}} package.&lt;br /&gt;
&lt;br /&gt;
To upgrade to a newer release, refer to the corresponding release notes and [[Upgrading_Alpine]].&lt;br /&gt;
&lt;br /&gt;
=== Upgrading &amp;quot;diskless&amp;quot; and &amp;quot;data&amp;quot; disk mode installs ===&lt;br /&gt;
&lt;br /&gt;
If booting a &amp;quot;diskless&amp;quot; system from a read-only device, or iso image on writable media, it&#039;s not possible to update the boot files (kernel, modules, firmware, ...) that reside on that device.&lt;br /&gt;
&lt;br /&gt;
It becomes possible to update the boot files, though, if using a boot device that is writable and has been prepared with &amp;lt;code&amp;gt;[[Alpine_setup_scripts#setup-bootable|setup-bootable]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
However, even then, the kernel, with its modules and firmware files, can still not be updated directly through regular packages updates. Instead, there is the &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt; script that can generate initfs images and install them together with upgraded kernels.&lt;br /&gt;
&lt;br /&gt;
Upgrading can be done as follows.&lt;br /&gt;
{{cmd|apk add mkinitfs&lt;br /&gt;
}}&lt;br /&gt;
This package is required for the generation of the initial filesystem used during boot.&lt;br /&gt;
* Additional initfs features that are missing in the default configuration, like the &amp;quot;btrfs&amp;quot; filesystem support (at the time of writing, to allow loading .apkovl configs and package cache during boot), may be enabled in &amp;lt;code&amp;gt;/etc/mkinitfs/mkinitfs.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Available initfs features may be listed with &amp;lt;code&amp;gt;ls /etc/mkinitfs/features.d&amp;lt;/code&amp;gt;&lt;br /&gt;
{{cmd|ls /etc/mkinitfs/features.d&lt;br /&gt;
apk add nano&lt;br /&gt;
nano /etc/mkinitfs/mkinitfs.conf&lt;br /&gt;
lbu commit&lt;br /&gt;
}}&lt;br /&gt;
Finally update the kernel and its boot environment.&lt;br /&gt;
{{cmd|update-kernel /media/sdXY/boot/&lt;br /&gt;
}}&lt;br /&gt;
* An &amp;lt;code&amp;gt;update-kernel&amp;lt;/code&amp;gt; run needs at least 8 GB free ram memory to avoid a broken modloop-image.&lt;br /&gt;
* See &amp;lt;code&amp;gt;update-kernel --help&amp;lt;/code&amp;gt; for options to manually add additional module or firmware packages.&lt;br /&gt;
&lt;br /&gt;
= Search for Packages =&lt;br /&gt;
The &#039;&#039;&#039;search&#039;&#039;&#039; command searches the repository Index files for installable packages. &lt;br /&gt;
&lt;br /&gt;
The return format is &#039;&#039;&#039;Package&#039;&#039;&#039;-&#039;&#039;&#039;Version&#039;&#039;&#039;. Omit &#039;&#039;&#039;Version&#039;&#039;&#039; for &#039;&#039;apk add &#039;&#039;&#039;Package&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* To list all packages available, along with their descriptions: {{cmd|apk search -v}}&lt;br /&gt;
* To list all packages are part of the ACF system: {{cmd|apk search -v &#039;acf*&#039; }}&lt;br /&gt;
* To list all packages that list NTP as part of their description, use the &#039;&#039;-d&#039;&#039; or &#039;&#039;--description&#039;&#039; option: {{cmd|apk search -v --description &#039;NTP&#039; }}&lt;br /&gt;
&lt;br /&gt;
= Information on Packages =&lt;br /&gt;
&lt;br /&gt;
== apk info ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;info&#039;&#039;&#039; command provides information on the contents of packages, their dependencies, and which files belong to a package.&lt;br /&gt;
&lt;br /&gt;
For a given package, each element can be chosen (for example, &#039;&#039;-w&#039;&#039; to show just the webpage information), or all information displayed with the &#039;&#039;-a&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Example: {{cmd|apk info -a zlib}}&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 description:&#039;&#039;&#039;&lt;br /&gt;
 A compression/decompression Library&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 webpage:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://zlib.net&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 installed size:&#039;&#039;&#039;&lt;br /&gt;
 94208&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 depends on:&#039;&#039;&#039;&lt;br /&gt;
 libc0.9.32&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 is required by:&#039;&#039;&#039;&lt;br /&gt;
 libcrypto1.0-1.0.0-r0&lt;br /&gt;
 apk-tools-2.0.2-r4&lt;br /&gt;
 openssh-client-5.4_p1-r2&lt;br /&gt;
 openssh-5.4_p1-r2&lt;br /&gt;
 libssl1.0-1.0.0-r0&lt;br /&gt;
 freeswitch-1.0.6-r6&lt;br /&gt;
 atop-1.25-r0 &lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 contains:&#039;&#039;&#039;&lt;br /&gt;
 lib/libz.so.1.2.5&lt;br /&gt;
 lib/libz.so.1&lt;br /&gt;
 lib/libz.so &lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 triggers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As shown in the example you can determine&lt;br /&gt;
* The &#039;&#039;&#039;description&#039;&#039;&#039; of the package (&#039;&#039;-d&#039;&#039; or &#039;&#039;--description&#039;&#039;)&lt;br /&gt;
* The &#039;&#039;&#039;webpage&#039;&#039;&#039; where the application is hosted (&#039;&#039;-w&#039;&#039; or &#039;&#039;--webpage&#039;&#039;)&lt;br /&gt;
* The &#039;&#039;&#039;size&#039;&#039;&#039; the package will require once installed (in bytes) (&#039;&#039;-s&#039;&#039; or &#039;&#039;--size&#039;&#039;)&lt;br /&gt;
* What packages are required to use this one  (&#039;&#039;&#039;depends&#039;&#039;&#039;) (&#039;&#039;-R&#039;&#039; or &#039;&#039;--depends&#039;&#039;)&lt;br /&gt;
* What packages require this one to be installed (&#039;&#039;&#039;required by&#039;&#039;&#039;) (&#039;&#039;-r&#039;&#039; or &#039;&#039;--rdepends&#039;&#039;)&lt;br /&gt;
* The &#039;&#039;&#039;contents&#039;&#039;&#039; of the package, that is, which files it installs (&#039;&#039;-L&#039;&#039; or &#039;&#039;--contents&#039;&#039;)&lt;br /&gt;
* Any &#039;&#039;&#039;triggers&#039;&#039;&#039; this package sets. (&#039;&#039;-t&#039;&#039; or &#039;&#039;--triggers&#039;&#039;) Listed here are directories that are watched; if a change happens to the directory, then the trigger script is run at the end of the apk add/delete. For example, doing a depmod once after installing all packages that add kernel modules.&lt;br /&gt;
&lt;br /&gt;
{{Tip|The &#039;&#039;&#039;info&#039;&#039;&#039; command is also useful to determine which package a file belongs to.  For example: {{cmd|apk info --who-owns /sbin/lbu}} will display&lt;br /&gt;
&lt;br /&gt;
 /sbin/lbu is owned by alpine-conf-x.x-rx&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Listing installed packages ===&lt;br /&gt;
&lt;br /&gt;
To list all installed packages, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apk info&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To list all installed packages in alphabetical order, with a description of each, do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;apk -vv info|sort&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The apk tool does not have a subcommand to list manually-installed packages that do not have reverse dependencies. To get this information on a traditional system that is not using [[Alpine local backup|lbu]], try this script. Note that this approach will also list core packages like alpine-base that should not be removed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/sh&lt;br /&gt;
apk info | grep -ve &#039;-doc$&#039; | sort | while read pkg&lt;br /&gt;
        do&lt;br /&gt;
                rdep=`apk info -qr &amp;quot;$pkg&amp;quot;`&lt;br /&gt;
                [ -z &amp;quot;$rdep&amp;quot; ] &amp;amp;&amp;amp; echo $pkg&lt;br /&gt;
        done&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== apk policy ==&lt;br /&gt;
&lt;br /&gt;
To display the repository a package was installed from and will be updated from, plus any [[#Repository_pinning|tagged]] or enabled repositories where it is also offered, if any, for this architecture - its &#039;&#039;&#039;policy&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
 apk policy &#039;&#039;package&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 $ apk policy vlc&lt;br /&gt;
 vlc policy:&lt;br /&gt;
  2.2.6-r1:&lt;br /&gt;
    lib/apk/db/installed&lt;br /&gt;
    http://dl-3.alpinelinux.org/alpine/v3.7/community&lt;br /&gt;
  3.0.0_rc2-r1:&lt;br /&gt;
    @edgecommunity http://dl-3.alpinelinux.org/alpine/edge/community&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Additional apk Commands =&lt;br /&gt;
In progress...&lt;br /&gt;
&lt;br /&gt;
= Local Cache =&lt;br /&gt;
&lt;br /&gt;
{{:Local_APK_cache}}&lt;br /&gt;
&lt;br /&gt;
= Advanced APK Usage =&lt;br /&gt;
&lt;br /&gt;
== Holding a specific package back ==&lt;br /&gt;
&lt;br /&gt;
In certain cases, you may want to upgrade a system, but keep a specific package at a back level. It is possible to add &amp;quot;sticky&amp;quot; or versioned dependencies. For instance, to hold the &#039;&#039;asterisk&#039;&#039; package to the 1.6.2 level or lower:&lt;br /&gt;
{{cmd|1=apk add asterisk=1.6.0.21-r0}}&lt;br /&gt;
or&lt;br /&gt;
{{cmd|apk add &#039;asterisk&amp;lt;1.6.1&#039;}}&lt;br /&gt;
&lt;br /&gt;
after which a {{cmd|apk upgrade}}&lt;br /&gt;
&lt;br /&gt;
will upgrade the entire system, keeping the asterisk package at the 1.6.0 or lower level&lt;br /&gt;
&lt;br /&gt;
To later upgrade to the current version,&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add &#039;asterisk&amp;gt;1.6.1&#039;}}&lt;br /&gt;
&lt;br /&gt;
will ensure that 1.6.1 is the minimum version used.&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;quot;fuzzy&amp;quot; version matching to pin the version to a major/minor release.  For example:&lt;br /&gt;
&lt;br /&gt;
{{cmd|1=apk add &#039;asterisk=~1.6&#039;}}&lt;br /&gt;
&lt;br /&gt;
will match any version of asterisk that starts with 1.6 (such as 1.6.0.21-r0 or 1.6.9.31-r9)  &amp;lt;ref&amp;gt;[https://git.alpinelinux.org/apk-tools/commit/?id=693b4bcdb0f22904a521a7c8ac4f13e697dc4d71 Alpine source commit message]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you desire deterministic, repeatable package installation (such as with containerized environments) via package pinning, it is important to understand your package repo&#039;s version retention rules.  For example, most Alpine package repos contain an &amp;quot;edge&amp;quot; branch, which may drop package versions that are not deemed fit to make it into a stable branch.  This means that pinning to a version on the edge branch may stop working after the package version is revoked from the repo.  Always pin to a package version that is intended for your current Alpine Linux version.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
== &amp;quot;apk-tools is old&amp;quot; == &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;apk update&#039;&#039;&#039;, &#039;&#039;&#039;apk upgrade&#039;&#039;&#039; or &#039;&#039;&#039;apk add&#039;&#039;&#039; may report the following: &lt;br /&gt;
 WARNING: This apk-tools is OLD! Some packages might not function properly&lt;br /&gt;
&lt;br /&gt;
This may happen if you are running Alpine Linux stable version with a certain edge/main, edge/community or testing package(s) also installed.  One resolution is to consider upgrading {{pkg|apk-tools}}.  If edge is already [https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management#Repository_pinning tagged] in your repositories, then try:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apk add --upgrade apk-tools@edge&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= External Links =&lt;br /&gt;
* [https://www.cyberciti.biz/faq/10-alpine-linux-apk-command-examples/ 10 Alpine Linux apk Command Examples]  Vivek Gite 2019&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Franklin Yu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=K3s&amp;diff=21106</id>
		<title>K3s</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=K3s&amp;diff=21106"/>
		<updated>2021-12-24T05:49:32Z</updated>

		<summary type="html">&lt;p&gt;Franklin Yu: Created page with &amp;quot;{{Pkg|k3s}} is a distribution of Kubernetes. Minimal configuration for the management node:  {{Cat|/etc/rancher/k3s/config.yaml|write-kubeconfig-mode: &amp;#039;0644&amp;#039; tls-san:   - foob...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Pkg|k3s}} is a distribution of Kubernetes. Minimal configuration for the management node:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/rancher/k3s/config.yaml|write-kubeconfig-mode: &#039;0644&#039;&lt;br /&gt;
tls-san:&lt;br /&gt;
  - foobar.local}}&lt;/div&gt;</summary>
		<author><name>Franklin Yu</name></author>
	</entry>
</feed>