How to upgrade Alpine Linux 3.4/3.5/3.6/3.7 to 3.8.xx

Originally published at: https://www.cyberciti.biz/faq/how-to-upgrade-alpine-linux-3-4-to-3-5-xx/

I am using Alpine Linux v3.6 or v3.7 with my LXD server. How do I upgrade Alpine Linux v3.7 to Alpine Linux v3.8? How can I upgrade Alpine Linux v3.7 to Alpine Linux v3.8?

Thanks for the article i read the 3.8 to 3.9 one but and it seemed to go ok except the /etc/alpine-release still said 3.8 any ideas

It is actually not updating current /etc/alpine-release file but creating another one. You can verify that with the following commands:

ls -l /etc/alpine-release* 

Its is thanks

cat /etc/alpine-release.apk-new
3.9.0

So is this now a Alpine 3.9 container or still actually a 3.8 one - all the packages have been upgraded.?

Also

lxc image show xxx
auto_update: true
properties:
  architecture: amd64
  description: Alpine 3.8 amd64 (20190218_13:01)
  os: Alpine
  release: "3.8"
  serial: "20190218_13:01"
public: false

How would i go about upgrading this to 3.9 in that case i just like all the versions to match so down the line i know what version i am on.

yes, if you followed info provided on my page your container is on 3.9. It is just that apk no longer updating original file and saving it as /etc/alpine-release.apk-new. Another way to verify it, just run:

cat /etc/issue

Screenshot%20from%202019-02-19%2016-18-39
HTH

HELP! one is stuck with Alpine Linux 3.6.2

cat /etc/alpine-release 
3.6.2

cat /etc/apk/repositories
http://dl-cdn.alpinelinux.org/alpine/v3.7/main
http://dl-cdn.alpinelinux.org/alpine/v3.7/community

apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.3-119-g356973950e [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.3-78-g634dbf6dd0 [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
OK: 9132 distinct packages available

apk upgrade --available;
Upgrading critical system libraries and apk-tools:
(1/3) Installing libressl2.6-libcrypto (2.6.5-r0)
(2/3) Installing libressl2.6-libssl (2.6.5-r0)
(3/3) Upgrading apk-tools (2.7.6-r0 -> 2.10.1-r0)
Executing busybox-1.26.2-r11.trigger
Executing ca-certificates-20161130-r3.trigger
Continuing the upgrade transaction with new apk-tools:
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  /bin/sh (virtual):
    provided by: busybox
    required by: bash-4.4.19-r1[/bin/sh] ca-certificates-20190108-r0[/bin/sh] bash-4.4.19-r1[/bin/sh] fontconfig-2.12.6-r0[/bin/sh]
                 fontconfig-2.12.6-r0[/bin/sh] fontconfig-2.12.6-r0[/bin/sh] java-cacerts-1.0-r0[/bin/sh] fontconfig-2.12.6-r0[/bin/sh]
                 mkfontdir-1.0.7-r1[/bin/sh] pinentry-1.0.0-r0[/bin/sh] fontconfig-2.12.6-r0[/bin/sh] bash-4.4.19-r1[/bin/sh] fontconfig-2.12.6-r0[/bin/sh]
                 pinentry-1.0.0-r0[/bin/sh] alpine-baselayout-3.0.5-r2[/bin/sh] fontconfig-2.12.6-r0[/bin/sh] java-common-0.1-r0[/bin/sh]
                 ca-certificates-20190108-r0[/bin/sh] fontconfig-2.12.6-r0[/bin/sh] mkfontscale-1.1.2-r1[/bin/sh] fontconfig-2.12.6-r0[/bin/sh]
                 alpine-baselayout-3.0.5-r2[/bin/sh] fontconfig-2.12.6-r0[/bin/sh] ca-certificates-20190108-r0[/bin/sh] mkfontscale-1.1.2-r1[/bin/sh]
                 mkfontdir-1.0.7-r1[/bin/sh]

what now?

can downgrade but can not upgrade!?

okay funny thing. as soon as the question asked one finds the solution:

apk add busybox