Before you type any one of the following command make sure that you have a backup of your important data before continuing to update your system. It is important that you keep full backup of your system. Alpine Linux is built around musl libc and busybox. This makes it smaller and more resource efficient than traditional GNU/Linux distributions. A container requires no more than 8 MB and a minimal installation to disk requires around 130 MB of storage. Not only do you get a fully-fledged Linux environment but a large selection of packages from the repository.

Fig.01: upgrade Alpine Linux Hard-disk or LXD VM installation

Alpine Linux was designed with security in mind. The kernel is patched with an unofficial port of grsecurity/PaX, and all userland binaries are compiled as Position Independent Executables (PIE) with stack smashing protection. These proactive security features prevent exploitation of entire classes of zero-day and other vulnerabilities. When Alpine Linux is installed to hard drive or as LXD VM, upgrading to a newer stable version is straightforward.

ADVERTISEMENTS

How to upgrade Alpine Linux

When Alpine Linux is installed to hard drive or cloud server, upgrading to a newer stable version is easy:

  1. Edit /etc/apk/repositories file, run: vi /etc/apk/repositories
  2. Change the version number by hand. For example, Alpine 3.11 to 3.12
  3. Save and close the file
  4. Fetch latest index by running the apk update
  5. Upgrade all your Alpine Linux packages: apk upgrade --available && sync
  6. Reboot the system, run: reboot

Let us see all commands and examples in details.

#linux

How to upgrade Alpine Linux 3.11 to 3.12 - nixCraft
11.15 GEEK