APK

APK is a package manager used on Alpine Linux.

Software packages for Alpine Linux are digitally signed tar.gz archives containing programs, configuration files, and dependency metadata. They have the extension .apk, and are often called “a-packs”.

The packages are stored in one or more repositories. A repository is simply a directory with a collection of *.apk files. The directory must include a special index file, named APKINDEX.tar.gz to be considered a repository.

The apk utility can install packages from multiple repositories. The list of repositories to check is stored in /etc/apk/repositories, one repository per line.

Usage

apk add

Add packages to WORLD and commit changes Usage: apk add [<OPTIONS>...] PACKAGES...

Options

OptionDescription
-i, --interactiveAsk confirmation
-p, --root ROOTManage file system at ROOT
-U, --update-cacheUpdate package cache
-X, --repository REPOSpecify additional package repository
--allow-untrustedInstall packages with untrusted signature or no signature
--arch ARCHTemporarily override architecture
--no-cacheDo not use any local cache path
--no-check-certificateDo not validate the HTTPS server certificates
-s, --simulateSimulate the requested operation without making any changes

apk del

Remove packages from WORLD and commit changes

Options

OptionDescription
-i, --interactiveAsk confirmation
-p, --root ROOTManage file system at ROOT
-X, --repository REPOSpecify additional package repository
--arch ARCHTemporarily override architecture

apk update

Update repository indexes

apk upgrade

Install upgrades available from repositories

Options

OptionDescription
-i, --interactiveAsk confirmation
-p, --root ROOTManage file system at ROOT
-U, --update-cacheUpdate package cache
-X, --repository REPOSpecify additional package repository
--allow-untrustedInstall packages with untrusted signature or no signature
--arch ARCHTemporarily override architecture
--no-cacheDo not use any local cache path
--no-check-certificateDo not validate the HTTPS server certificates
-s, --simulateSimulate the requested operation without making any changes

apk cache

Manage local package cache by removing obsolete packages, or downloading missing or newer packages from the repositories. Usage:

apk cache [<OPTIONS>...] clean
apk cache [<OPTIONS>...] download [DEPENDENCY...]
apk cache [<OPTIONS>...] purge
apk cache [<OPTIONS>...] sync [DEPENDENCY...]

apk info

Give detailed information about packages or repositories

Options

OptionDescription
-a, --allList all information known about the package
-d, --descriptionPrint the package description
-e, --installedCheck package installed status
-L, --contentsList files included in the package
-P, --providesList what the package provides
-r, --rdependsList reverse dependencies of the package (all other packages which depend on the package)
-R, --dependsList the dependencies of the package
-s, --sizePrint the package’s installed size
-w, --webpagePrint the URL for the package’s upstream webpage

apk list

List packages matching a pattern or other criteria Usage: apk list [<OPTIONS>...] PATTERN...

Options

OptionDescription
-I, --installedConsider only installed packages
-O, --orphanedConsider only orphaned packages
-a, --availableConsider only available packages
-u, --upgradable, --upgradeableConsider only upgradable packages
-o, --originList packages by origin
-d, --dependsList packages by dependency
-P, --providersList packages by provider

Search for packages by name or description Usage: apk search [<OPTIONS>...] PATTERN...

apk fetch

apk fetch downloads the requested packages from the configured package repositories (see repositories) to a local directory. The current working directory is used as the destination directory unless -o is specified.

Options

OptionDescription
-l, --linkCreate hard links if possible
-o, --output DIRWrite the downloaded file(s) to DIR
-R, --recursiveFetch packages and all of their dependencies
-s, --stdoutDump the .apk file(s) to stdout
-w, --worldDownload packages needed to satisfy WORLD
--simulateSimulate the requested operation without making any changes
--urlPrint the full URL for downloaded packages

apk manifest

Show checksums of package contents

apk verify

Verify package integrity and signature

apk audit

Audit system for changes

apk stats

Show statistics about repositories and installations