In Linux Alpine I use apk version package to retrieve the installed version of a package. For some reason, some packages simply does not return any result. Is there another way to do that or am I missing something?

docker run -it --rm alpine:3.15
apk add bash openssh-client

# Installs packages

apk version bash
Installed:                                Available:
bash-5.1.8-r0                           = 5.1.8-r0

apk version openssh-client
Installed:                                Available:

1 Answer 1


If all that is required is human readable version info, that is still obtainable from apk for openssh-client using:

~ # apk info openssh-client
openssh-client-default-9.3_p1-r3 description:
OpenBSD's SSH client

openssh-client-default-9.3_p1-r3 webpage:

As to apk version, firstly apk version any_unrecognised_string returns exactly the same empty output. I think this is because openssh-client is a meta package, a collection of other packages bundled for convenience. Like build-base, but unlike build-base perhaps all openssh-client's metadata hasn't yet been provided by the uploader.

apk add openssh-client installs 3 applications (and perhaps more). This can be seen by doing:

~ # apk info | grep openssh*

Version info for each of those programs can be looked up using its full name, e.g. apk version openssh-client-common. Or for all three by:

~ # apk info | grep openssh* | xargs apk version
Installed:                                Available:
openssh-client-common-9.3_p1-r3         = 9.3_p1-r3
openssh-client-default-9.3_p1-r3        = 9.3_p1-r3
openssh-keygen-9.3_p1-r3                = 9.3_p1-r3
  • 1
    A little late to the party, but that makes sense! Thanks for the explanation.
    – Julien B.
    May 24, 2023 at 15:10
  • You're welcome. I couldn't even find a listing for openssh-client on the package index's website, so there's defintiely something different about it. pkgs.alpinelinux.org/… May 24, 2023 at 18:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .