Include:Upgrading to latest release
When Alpine Linux is installed to hard drive, upgrading to a newer stable version is straightforward.
To begin, you need to update your /etc/apk/repositories file. Here are some shortcuts for doing so:
- Launch /etc/apk/repositories. Change the version number by hand. Enter to edit
- Or, edit the file in place. This is how you'd change v2.5 to v2.6:
- Or set directly the last stable release on the repository file /etc/apk/repositories and avoid jump the release number each time:
Or you could do this manually: Edit the /etc/apk/repositories file using an editor ( for instance) and if necessary, add references to the Alpine package repositories. In the example below, the file references the Alpine CD, so that if a requested package is available on the local media, it will be obtained from there instead of being downloaded from the remote repository:
To upgrade, in this example, from version 3.3 to 3.4, simply change:
So that the file will look like this:
Above, only one possible repository is shown, however,
http://dl-3.alpinelinux.org/alpine/ may also be replaced with any geographically close mirror from:
Updating package lists
With the correct repositories file in place, the latest index list of available packages can be obtained with:
If you'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:
Next, upgrade all your packages:
--available 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.