Alpine apk¶
Alpine Package Keeper (apk) used by Alpine Linux.
Documentation: https://wiki.alpinelinux.org/wiki/Alpine_Package_Keeper
Note
installed and outdated both parse the list applet, so the
version floor is 2.10.0: the release that introduced it. Progress
output is disabled on every call to keep the parsed lines stable.
Caution
outdated reads the local repository cache rather than the remote, so
sync must run first for an accurate upgrade list.
Version requirement:
>=2.10.0
Platforms¶
🐧 Linux
Operations¶
Operation |
Supported |
Notes |
|---|---|---|
|
✓ |
|
|
✓ |
|
|
✓ |
exact search backfilled by |
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
Ecosystem¶
Accepted purl types:
pkg:apk
Usage¶
$ mpm --apk installed
$ mpm --apk search "query"
$ mpm --apk upgrade --all
$ mpm install pkg:apk/hello
$ mpm --dry-run --apk upgrade --all
Every example above accepts --dry-run, which simulates the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Deselect the manager for a single run with --no-apk, disable it from your configuration, or tune its invocation attributes with per-manager overrides.
Command line¶
CLI names, in lookup order:
apkArguments forced before each call:
--no-progress
The version is probed by running:
$ apk --version
apk-tools 2.14.10, compiled for x86_64.
and extracted with:
r"apk-tools\s+(?P<version>[^\s,]+)"
Privilege escalation¶
System-wide manager: mpm wraps its privileged operations in sudo out of the box. Instead of letting the tool prompt mid-run, mpm primes the credential cache up-front, with a single branded password prompt at most. Turn escalation off for rootless setups with --no-sudo or the per-manager sudo override.
See privilege escalation for the full policy.
Cooldown¶
State of Alpine apk’s release-age gating, from the cooldown support table:
Status: ❌ None
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.
Reference traces¶
Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. If you know Alpine apk well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ apk --no-progress list --installed
acl-2.2.53-r0 x86_64 {acl} (LGPL-2.1-or-later AND GPL-2.0-or-later) [installed]
alpine-baselayout-3.4.3-r1 x86_64 {alpine-baselayout} (GPL-2.0-only) [installed]
apk-tools-2.14.0-r5 x86_64 {apk-tools} (GPL-2.0-only) [installed]
busybox-1.36.1-r5 x86_64 {busybox} (GPL-2.0-only) [installed]
python3-3.11.6-r0 x86_64 {python3} (PSF-2.0) [installed]
$ apk --no-progress list --upgradable
acl-2.3.1-r0 x86_64 {acl} (LGPL-2.1-or-later) [upgradable from: acl-2.2.53-r0]
python3-3.11.7-r0 x86_64 {python3} (PSF-2.0) [upgradable from: python3-3.11.6-r0]