Skip to content

Alpine Linux Quick Reference Commands

Package Management

Action Command Example Info
Add package apk add firefox
Add package apk add firefox openbox Multiple packages will be installed.
Add package locally apk add --allow-untrusted /path/to/file.apk Install local package.
List packages apk list List all available and installed packages.
List packages installed apk list -I
List packages orphaned apk list -O
List packages upgradeable apk list -u
List package dependencies apk info -R firefox
List package reverse dependencies apk info -r firefox List all other packages which depend on the package.
Remove package apk del firefox
Search package apk search firefox Searches through package name and description. Results return package name.
Search package name/description apk search -v firefox Results return package name and description.
Search package description apk search -d firefox
Search packages installed apk list -I grep -i keyword
Show file origin apk info --who-owns /usr/bin/chromium-browser
Show statistics apk stats
Update repository apk update Update repository indexes.
Update/Upgrade packages apk -U upgrade Update repository indexes and install available packages upgrades.
Upgrade packages apk upgrade -s Simulate the install of available package upgrades.
Upgrade packages apk upgrade Install available package upgrades from repositories.
Upgrade packages apk upgrade --ignore firefox Upgrade all packages except the ones listed.
View package info apk info firefox
View package info apk info -L firefox List files included in the package.

Service Management

Action Command Example Info
Add service rc-update add docker
List all services rc-update -v show
List failed services rc-status --crashed
List running services status rc-status
Remove service rc-update del docker
Restart service rc-service docker restart
Start service rc-service docker start
Status service rc-service docker status
Stop service rc-service docker stop
System halt halt
System poweroff poweroff
System reboot reboot