Alpine apk: List all available package versions
The command list the info from the lastest branch and Alpine manage package version in different branches for example v3.5, v3.6.... v3.10
The
apk utility
can install packages from multiple repositories. The list of repositories to check is stored in /etc/apk/repositories, one repository per line.
You can search for the version here
https://pkgs.alpinelinux.org/packages?name=bash&branch=v3.5
or
https://pkgs.alpinelinux.org/packages
So if you are interested to add the version bash4.3
the should tell the branch name while adding the older version or from other branchers rather then the latest one.
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.5/main/ bash=4.3.46-r5
So if you run
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.5/main/ && apk info bash
You will get the version info from two different branches.
The GNU Bourne Again shellbash-4.3.46-r5 webpage:http://www.gnu.org/software/bash/bash.htmlbash-4.3.46-r5 installed size:700416bash-5.0.0-r0 description:The GNU Bourne Again shellbash-5.0.0-r0 webpage:https://www.gnu.org/software/bash/bash.htmlbash-5.0.0-r0 installed size:1200128