Skip to content
# Package management

APK (Alpine)

Install, update and remove packages on Alpine Linux with apk β€” the tiny, container-friendly distro.

The basics

Alpine's apk is intentionally minimal, which is exactly why it's the default base for so many Docker images. add installs, del removes, update refreshes the index.

bash
apk update
apk add nginx
apk del nginx

Updating everything

upgrade brings all installed packages to their latest available version after an update.

bash
apk update && apk upgrade

Searching for a package

search matches package names; info shows details about a specific one.

bash
apk search redis
apk info redis

musl, not glibc

Alpine uses musl libc instead of glibc, which is part of why it's so small β€” but it also means some precompiled binaries built for glibc-based distros (Ubuntu, Debian, RHEL) won't run unmodified. Worth knowing before you assume any generic Linux binary will just work.