Skip to content

apk Command Reference (Alpine Linux)

Commands for installing and updating packages in Alpine Linux and containers using APK.

Core Package Management

Install software.

apk add <package_name>

Remove (uninstall) software.

apk del <package_name>

Upgrade software.

apk upgrade

Install software temporarily (removed on next reboot or cache clean).

apk add --virtual <virtual_package_name> <package_name>

Search and Information

Search for software matching specified strings.

apk search <search_term>

List packages depending on their relation to the system with additional details.

apk info <package_name>

Find what package provides the given value.

apk info --who-owns <file_path>

Repository and Configuration Management

Generate the metadata cache (update package lists).

apk update

Clean cache.

apk cache clean