LinuxCommandLibrary

apk

TLDR

Update repository indexes and upgrade all packages

$ apk upgrade -U
copy
Only update repository indexes
$ apk update
copy
Install a new package
$ apk add [package]
copy
Remove a package
$ apk del [package]
copy
Repair/Reinstall a package without modifying main dependencies
$ apk fix [package]
copy
Search for packages by name with descriptions
$ apk search -v [keyword]
copy
Search for packages by description
$ apk search -d [keyword]
copy
Display information about a specific package
$ apk info [package]
copy

SYNOPSIS

apk [options] command [arguments]

DESCRIPTION

apk (Alpine Package Keeper) is the package management tool for Alpine Linux. It handles installation, upgrade, and removal of packages, as well as repository management and system maintenance.

PARAMETERS

add

Add or modify constraints and commit changes
del
Remove constraints and commit changes
fix
Fix, reinstall, or upgrade packages without modifying world
update
Update repository indexes
upgrade
Install upgrades available from repositories
cache
Manage the local package cache
search
Search for packages by name or description
info
Display detailed information about packages
list
List packages matching a pattern or criteria
query
Interrogate installed database and indexes
policy
Show repository policy for packages
-U, --update-cache
Update package lists before operation
-v, --verbose
Print more verbose information
-d, --description
Search in package descriptions
--allow-untrusted
Install local packages without verification
-X, --repository
Specify supplemental repositories

CAVEATS

Alpine Linux specific; not available on other distributions. Uses a minimal package format designed for size and simplicity.

HISTORY

Developed for Alpine Linux, a security-oriented, lightweight Linux distribution. Alpine is widely used in container environments due to its small footprint.

SEE ALSO

apt(8), dnf(8), pacman(8)

Copied to clipboard