Skip to content

apk-file: Search apk packages via the command line

Daniele Debernardi requested to merge feature/apk-file into master

Search which packages contains a specific file. Example:

/ # apk-file -h
             _          __ _ _
  __ _ _ __ | | __     / _(_) | ___
 / _` | '_ \| |/ /____| |_| | |/ _ \
| (_| | |_) |   <_____|  _| | |  __/
 \__,_| .__/|_|\_\    |_| |_|_|\___|
      |_|

 Search apk package contents via the command line.
 Version:

  -arch string
        arch to search for (x86, x86_64, armhf)
  -d    run in debug mode
  -repo string
        repository to search in (main, community, testing)
  -v    print version and exit (shorthand)
  -version
        print version and exit
/ # apk-file -arch armhf glxgears
FILE                         PACKAGE             BRANCH              REPOSITORY          ARCHITECTURE
/usr/bin/glxgears_fbconfig   mesa-demos          v3.7                community           armhf
/usr/bin/glxgears            mesa-demos          v3.7                community           armhf
/usr/bin/glxgears_pixmap     mesa-demos          v3.7                community           armhf
/usr/bin/glxgears_fbconfig   mesa-demos          edge                community           armhf
/usr/bin/glxgears            mesa-demos          edge                community           armhf
/usr/bin/glxgears_pixmap     mesa-demos          edge                community           armhf
/usr/bin/glxgears_fbconfig   mesa-demos          v3.6                community           armhf
/usr/bin/glxgears            mesa-demos          v3.6                community           armhf
/usr/bin/glxgears_pixmap     mesa-demos          v3.6                community           armhf
/usr/bin/glxgears_fbconfig   mesa-demos          v3.5                community           armhf
/usr/bin/glxgears            mesa-demos          v3.5                community           armhf
/usr/bin/glxgears_pixmap     mesa-demos          v3.5                community           armhf
/usr/bin/glxgears_fbconfig   mesa-demos          v3.4                community           armhf
/usr/bin/glxgears            mesa-demos          v3.4                community           armhf
/usr/bin/glxgears_pixmap     mesa-demos          v3.4                community           armhf
/usr/bin/glxgears_fbconfig   mesa-demos          v3.3                community           armhf
/usr/bin/glxgears            mesa-demos          v3.3                community           armhf
/usr/bin/glxgears_pixmap     mesa-demos          v3.3                community           armhf
/ #

Merge request reports