How to search for a file in apk packages

You have three ways basically.

First: The package should be installed and you need to specify the full path :

apk info --who-owns /path/to/the/file

Second: Use the pkgs.alpinelinux.org website

Third: Use the api.alpinelinux.org API by filtering the json output. For this you need a json parser like jq:

apk add jq

then use the API with the instructions provided here

.: Francesco


You're looking for the equivalent of Debian's apt-file for Alpine. Searching for that yields apk-file.

Basically apt-file but for alpine.