<?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=Fourstepper</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=Fourstepper"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Fourstepper"/>
	<updated>2026-04-30T18:20:59Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=18569</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=18569"/>
		<updated>2021-01-14T18:06:43Z</updated>

		<summary type="html">&lt;p&gt;Fourstepper: Update the upgrade section for run-from-RAM&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page covers upgrading to a 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;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before continuing to update your system, make sure that you have a backup of your important data.}}&lt;br /&gt;
== Upgrading an Alpine Linux Hard-disk installation ==&lt;br /&gt;
&lt;br /&gt;
=== Upgrading Alpine v2.x to v3.x ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Alpine Linux 3.x switched to a different libc implementation compared to previous versions. Because the new Musl libc is not ABI compatible with uClibc, there are additional steps required for an upgrade.}}&lt;br /&gt;
&lt;br /&gt;
==== Installing statically linked tools ====&lt;br /&gt;
&lt;br /&gt;
Statically linked version of apk-tools is needed, because the old musl version would stop working after a libc change (possibly in the middle of upgrade). Static version of busybox can be handy in case of the recovery from a failure.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add busybox-static apk-tools-static}}&lt;br /&gt;
&lt;br /&gt;
==== Changing repositories to v3.x ====&lt;br /&gt;
&lt;br /&gt;
To begin, you need to update your {{Path|/etc/apk/repositories}} file. Here are some shortcuts for doing so:&lt;br /&gt;
:* Launch {{Cmd|setup-apkrepos}} Enter {{Key|e}} to edit {{Path|/etc/apk/repositories}}. Change the version number by hand.&lt;br /&gt;
:* Or, edit the file in place. This is how you&#039;d change &amp;lt;var&amp;gt;v2.7&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;v3.0&amp;lt;/var&amp;gt;: {{Cmd|sed -i -e &#039;s/&amp;lt;var&amp;gt;v2\.7&amp;lt;/var&amp;gt;/&amp;lt;var&amp;gt;v3.0&amp;lt;/var&amp;gt;/g&#039; /etc/apk/repositories}}&lt;br /&gt;
&lt;br /&gt;
==== Upgrading system ====&lt;br /&gt;
&lt;br /&gt;
Use statically linked version of apk to update content of repository:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk.static update}}&lt;br /&gt;
&lt;br /&gt;
Simulating upgrade is recommended in order to detect issues beforehand:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk.static upgrade --no-self-upgrade --available --simulate}}&lt;br /&gt;
&lt;br /&gt;
With no problems encountered or after resolving them, start proper upgrade:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk.static upgrade --no-self-upgrade --available}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to latest release ===&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 from older versions ===&lt;br /&gt;
&lt;br /&gt;
See [[Upgrading from older versions]].&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on CD ==&lt;br /&gt;
&lt;br /&gt;
You may have an installation where the boot media being used (such as a CD, for example) is separate from the media used to store the configuration information. In this case, simply download the latest ISO, and replace the boot media contents with the contents of the latest ISO. If you are 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 remaining packages from Web repository ===&lt;br /&gt;
&lt;br /&gt;
If you are using [[How_to_enable_APK_caching|APK caching]] you should also perform the following steps.&lt;br /&gt;
{{:Include:Using_Internet_Repositories_for_apk-tools}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re upgrading from a version of Alpine before 2.3.0_rc1, ensure you have the latest available version of the Alpine Linux Package Manager first before upgrading anything else:&lt;br /&gt;
{{Cmd|apk add --upgrade apk-tools}}&lt;br /&gt;
&lt;br /&gt;
Next, upgrade all your packages:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk upgrade --available&lt;br /&gt;
sync}}&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;
After upgrading packages, save any configuration changes (you should have backed up your earlier configuration prior to upgrading).&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&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 remaining packages from Web repository ===&lt;br /&gt;
If you are using [[How_to_enable_APK_caching|APK caching]] you should follow the instructions to [[#Update_remaining_packages_from_Web_repository|Update remaining packages from Web repository]], above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Fourstepper</name></author>
	</entry>
</feed>