table of contents
- Tumbleweed 3.0.1-1.1
- Leap-16.0
| apk(8) | System Manager's Manual | apk(8) |
NAME¶
apk - Alpine Package Keeper
SYNOPSIS¶
apk [<global options>...] command [<options>...] [<arguments>...]
DESCRIPTION¶
apk manages packages installed on the system. The set of top level constraints on system packages is called the world (see apk-world(5)).
apk supports various sub-commands to query and manipulate world and package repositories.
All apk commands which modify the database are logged to /var/log/apk.log.
By default apk is non-interactive. See FILES or --interactive on changing this default to be interactive.
Only global options should be specified before command. For backwards compatilibity a best effort attempt is made to parse applet specific options before the command, but this is deprecated and subject to be removed.
COMMANDS¶
Each command is documented in detail on its manual page.
PACKAGE INSTALLATION AND REMOVAL¶
| apk-add(8) | Add or modify constraints in world and commit changes |
| apk-del(8) | Remove constraints from world and commit changes |
SYSTEM MAINTENANCE¶
| apk-fix(8) | Fix, reinstall or upgrade packages without modifying world |
| apk-update(8) | Update repository indexes |
| apk-upgrade(8) | Install upgrades available from repositories |
| apk-cache(8) | Manage the local package cache |
QUERYING PACKAGE INFORMATION¶
| apk-query(8) | Query information about packages by various criteria |
| apk-list(8) | List packages matching a pattern or other criteria |
| apk-dot(8) | Render dependencies as graphviz graphs |
| apk-policy(8) | Show repository policy for packages |
| apk-search(8) | Search for packages by name or description |
| apk-info(8) | Give detailed information about packages or repositories |
REPOSITORY AND PACKAGE MAINTENANCE¶
| apk-mkndx(8) | Create repository index (v3) file from packages |
| apk-mkpkg(8) | Create package (v3) |
| apk-index(8) | Create repository index (v2) file from packages |
| apk-fetch(8) | Download packages from repositories to a local directory |
| apk-manifest(8) | Show checksums of package contents |
| apk-extract(8) | Extract package file contents |
| apk-verify(8) | Verify package integrity and signature |
| apk-adbsign(8) | Sign, resign or recompress v3 packages and indexes |
MISCELLANEOUS¶
| apk-audit(8) | Audit system for changes |
| apk-stats(8) | Show statistics about repositories and installations |
| apk-version(8) | Compare package versions or perform tests on version strings |
| apk-adbdump(8) | Dump v3 files in textual representation |
| apk-adbgen(8) | Generate v3 files from text representation |
| apk-convdb(8) | Convert v2 installed database to v3 format |
| apk-convndx(8) | Convert v2 indexes to v3 format |
OPTION SYNTAX¶
The BOOL argument for options is 'yes' or 'no'. The AUTO argument for options is 'yes', 'no' or 'auto'. The default value for these arguments is options specific.
For options with an AUTO or BOOL argument, the argument must be specified with the --option=argument format (that is, the --option argument format is not supported). Additionally the following aliases are available:
- --option equals --option=yes
- --no-option equals --option=no
GLOBAL OPTIONS¶
The following options are available for all commands.
--allow-untrusted
--arch ARCH
When used with --root the architecture will also be saved.
--cache[=BOOL]
--cache-dir CACHEDIR
--cache-max-age AGE
--cache-packages[=BOOL]
--cache-predownload[=BOOL]
--check-certificate[=BOOL]
--force, -f
--force-binary-stdout
--force-broken-world
APK will try to determine the world constraints that causes packages with conflicting dependencies and start disabling the world constraints in this order until a satisfiable set of constraints is left. Using this switch on hard disk installation will likely result in unexpected removal of some packages. If uncertain, use with --interactive or --simulate first.
--force-missing-repositories
--force-no-chroot
--force-non-repository
--force-old-apk
--force-overwrite
--force-refresh
--help, -h
--interactive[=AUTO]
--keys-dir KEYSDIR
--legacy-info[=BOOL]
--logfile[=BOOL]
--network[=BOOL]
--preserve-env[=BOOL]
--pretty-print[=AUTO]
--preupgrade-depends DEPS
--print-arch
--progress[=AUTO]
--progress-fd FD
--purge[=BOOL]
--quiet, -q
--repositories-file REPOFILE
--repository, -X REPO
--repository-config REPOCONFIG
--root, -p ROOT
--root-tmpfs[=AUTO]
This affects:
- reading and creation of 'installed' index in the cache
- purging of packages in cache
- safety checks to not install non-repository packages
--sync[=AUTO]
--timeout TIME
--update-cache, -U
--uvol-manager UVOL
--verbose, -v
--version, -V
--wait TIME
COMMIT OPTIONS¶
The following options are available for all commands which commit the database.
--clean-protected[=BOOL]
--commit-hooks[=BOOL]
--initramfs-diskless-boot
--overlay-from-stdin
--scripts[=BOOL]
--simulate[=BOOL], -s
GENERATION OPTIONS¶
The following options are available for all commands which generate APKv3 files.
--compression, -C ALGORITHM[:LEVEL]
- none
- deflate (level 1-9)
- zstd (level 1-22)
--sign-key KEYFILE
ENVIRONMENT¶
APK_CONFIG
LANG
SOURCE_DATE_EPOCH
TERM
Variables to configure built-in libfetch¶
FETCH_BIND_ADDRESS
NETRC
HTTP_AUTH
HTTP_REFERER
HTTP_USER_AGENT
HTTP_PROXY, http_proxy
HTTPS_PROXY, https_proxy
If set, these variables should contain the proxy URL for http
HTTP_PROXY_AUTH
NO_PROXY, no_proxy
SSL_CLIENT_CERT_FILE
SSL_CLIENT_KEY_FILE
SSL_NO_VERIFY_HOSTNAME
Environment for the scripts APK executes¶
Normally apk will execute scripts with a sanitized, minimal environment containing only PATH. See also --preserve-env to pass additional environment variables.
Before executing a script, apk will set working directory as ROOT and performs a chroot unless --force-no-chroot is specified. In either case, the script working directory should be treated as the system root.
The environment variables defined by APK are the following:
APK_PACKAGE
APK_SCRIPT
FILES¶
Configuration files¶
/etc/apk/config
/lib/apk/config
A configuration file contains one long option per line. For example:
timeout 120
/etc/apk/interactive
Configuration files (relative to --root)¶
/etc/apk/arch
/etc/apk/cache
/etc/apk/commit_hooks.d/*
/lib/apk/commit_hooks.d/*
See also the ENVIRONMENT section for the environment variables.
If --no-scripts or --no-commit-hooks option is specified, these hook scripts are not executed.
/etc/apk/keys
/lib/apk/keys
/etc/apk/protected_paths.d/*.list
/etc/apk/repositories
/etc/apk/repositories.d/*.list
/lib/apk/repositories.d/*.list
/etc/apk/world
Configuration files for built-in libfetch¶
/etc/apk/ca.pem
/etc/apk/crl.pem
/etc/apk/cert.key
/etc/apk/cert.pem
System files¶
/lib/apk/db/lock
/lib/apk/db/installed
/lib/apk/db/scripts.tar
/lib/apk/db/scripts.tar.gz
/lib/apk/db/triggers
/lib/apk/db-uvol
/lib/apk/exec
/var/log/apk.log
NOTES¶
This apk has coffee making abilities.
| 2025-12-03 |