How to list and search packages on Alpine Linux Server
How to list and search package on Alpine Linux Server
Do the below steps to list all packages on Alpine Linux server
1. Log into your Alpine server as ‘root’ user.
2. First you must run ‘apk update’ to update the Alpine package list.
3. Type the command ‘apk search’ to list all package on your Server.
# apk search
# apk search | wc -l
‘apk search’ command will return long list of packages so please use ‘less’ option to list the packages one screen at a time.
# apk search | less
To list all package version (instead of latest version) use ‘--all’ or ‘-a’ option.
# apk search --all
# apk search -a
Use grep to filter out specific keyword from the package list.
# apk search | grep php
Use ‘-v’ or ‘--verbose’ option to list all the packages and along their description.
# apk search --verbose
# apk search -v
How to list all installed packages on Alpine Linux Server
apk list -I
apk list --installed
You can also use ‘apk info’ command to list installed package on Alpine.
To list contents of a package
# apk info -L [package_name]
# apk info --contents [package_name]
To list all package that depends on another package
# apk info --rdepends [package_name]
# apk info -r [package_name]
# apk info --rdepends python
python2-2.7.15-r3 is required by:
List all packages that package depend on
supervisor-3.3.4-r1 depends on:
In the above example you can see that ‘supervisor’ package depends on python2.
How to print all information of a package on Alpine Server
# apk info [package_name] --all
# apk info supervisor --all
--all option will shows all details like package website, package dependencies, size of package, package description etc.
How to list content of a package installed on Alpine Linux Server
apk info [package_name] -L less
apk info supervisor -L | less