Skip to main content

apk manual

apk - Man Page

Alpine Package Keeper

Examples (TL;DR)

  • Update repository indexes from all remote repositories: apk update
  • Install a new package: apk add package
  • Remove a package: apk del package
  • Repair a package or upgrade it without modifying main dependencies: apk fix package
  • Search for a package via keywords: apk search keywords
  • Display information about a specific package: apk info package


apk [<options>...] command [<arguments>...]


apk manages packages installed on the system. The set of top level packages to install is called the world (see apk-world(5)). apk supports various sub-commands to query and manipulate world and local & remote package repositories.


Each command is documented in detail on its manual page.

Package Installation and Removal

apk-add(8)Add packages to world and commit changes
apk-del(8)Remove packages 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-info(8)Give detailed information about packages or repositories
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

Repository Maintenance

apk-index(8)Create repository index file from packages
apk-fetch(8)Download packages from global repositories to a local directory
apk-manifest(8)Show checksums of package contents
apk-verify(8)Verify package integrity and signature


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

Global Options

The following options are available for all commands.

-f,  --force

Enable selected --force-* options (deprecated).

-i,  --interactive

Ask confirmation before performing certain operations.

-p,  --root <ROOT>

Manage file system at ROOT.

-q,  --quiet

Print less information.

-U,  --update-cache

Alias for '--cache-max-age 1'.

-v,  --verbose

Print more information (can be specified twice).

-V,  --version

Print program version and exit.

-X,  --repository <REPO>

Specify additional package repository. This option can be specified multiple times.


Install packages with untrusted signature or no signature.

--arch ARCH

Temporarily override architecture, to be combined with --root.

--cache-dir CACHEDIR

Temporarily override the cache directory. CACHEDIR is treated relative to the ROOT.

--cache-max-age AGE

Maximum AGE (in minutes) for index in cache before it's refreshed.


Continue even if binary data will be printed to the terminal.


Continue even if world cannot be satisfied.


Continue even if packages may be lost on reboot. This can happen when running in run-from-tmpfs mode, and installing non-repository package.


Continue even if packages use unsupported features.


Overwrite files in other packages.


Do not use cached files (local or from proxy).

--keys-dir KEYSDIR

Override directory of trusted keys. This is treated relative to ROOT.


Do not use any local cache path.


Do not use the network. The cache is still used when possible.


Disable progress bar even for TTYs.


Print default arch and exit.


Show progress.

--progress-fd FD

Write progress to the specified file descriptor.


Delete modified configuration files on package removal and uninstalled packages from cache on cache clean.

--repositories-file REPOFILE

Override system repositories, see apk-repositories(8). Specifying this option overrides the normal repositories file and repositories.d directory processing. The given REPOFILE is relative to the startup directory since apk 2.12.0_rc2.

--wait TIME

Wait for TIME seconds to get an exclusive repository lock before failing.

Commit Options

The following options are available for all commands which commit the database.

-s,  --simulate

Simulate the requested operation without making any changes.


Do not create .apk-new files in configuration directories.


Read list of overlay files from stdin. Normally this is used only during initramfs when booting run-from-tmpfs installation.


Do not execute any scripts. Useful for extracting a system image for different architecture on alternative ROOT.


Skip pre/post hook scripts (but not other scripts).


Used by initramfs when it's recreating root tmpfs. This enables selected force options to minimize failure, and disables commit hooks, among other features.

apk-add - Man Page

add packages to world and commit changes


apk add [<options>...] packages...


apk add adds the requested packages to world and installs (or upgrades) them if not already present, ensuring all dependencies are met.

To upgrade individual packages without modifying world use apk-fix(8).

By default apk tries to select a set of packages so that all dependencies are satisfied. This means that some packages can be held back in an older version if there is direct or implicit dependencies to the older version.


apk add supports the commit options described in apk(8), as well as the following options:


Initialize a new package database.

-l,  --latest

Always choose the latest package by version. However, the versions considered are based on the package pinning. Primarily this overrides the default heuristic and will cause an error to displayed if all dependencies cannot be satisfied.

-u,  --upgrade

Upgrade packages and it's dependencies. Normally apk add will avoid changing installed package unless it is required by the newly added packages or their dependencies. This changes the default preference to upgrading the package to the latest installable version.

-t,  --virtual NAME

Create virtual package NAME with given dependencies. This new package will get the packages as dependencies instead of world. Finally the NAME is added to world.

One can use this to ensure that selected set of packages are installed, and later the temporary modification be undone with apk-del(8) NAME without removing packages that were installed earlier.


Do not change file owner or group. By default apk will manage the file ownership when running as root. However, this option is turned on when running as non-root user, as changing file ownership is not permitted by the system then.

apk-del - Man Page

remove packages from world and commit changes


apk del [<options>...] packages...


apk del removes packages from world and uninstalls them if no longer required by any other packages.


apk del supports the commit options described in apk(8), as well as the following options:

-r,  --rdepends

Recursively delete all top-level reverse dependencies, too.

apk-fix - Man Page

repair packages or system


apk fix [<options>...] [packages...]


apk fix applies repair strategies to correct errors in the installation of the specified packages, or all installed packages if none are specified.


apk fix supports the commit options described in apk(8), as well as the following options:

-d,  --depends

Also fix dependencies of specified packages.

-r,  --reinstall

Reinstall packages (default).

-u,  --upgrade

Upgrade name PACKAGE if an upgrade exists and does not break dependencies.

-x,  --xattr

Fix packages with broken xattrs.


Reset all directory permissions.

apk-update - Man Page

update repository indexes


apk update


apk update forces updating of the indexes from all configured package repositories. This command is not needed in normal operation as all applets requiring indexes will automatically refresh them after caching time expires.

See apk-repositories(5) for more information on configuring package repositories.


apk update does not support any specific options. See apk(8) for global options.


apk-upgrade - Man Page

upgrade installed packages


apk upgrade [<options>...] [<packages>...]


apk upgrade upgrades installed packages to the latest version available from configured package repositories (see apk-repositories(5)). When no packages are specified, all packages are upgraded if possible. If list of packages is provided, only those packages are upgraded along with needed dependencies.


apk upgrade supports the commit options described in apk(8), as well as the following options:

-a,  --available

Reset all packages to versions available from current repositories. This resets all versioned dependencies in world (see apk-world(5)). Additionally, packages are selected from active repositories if possible even if it means replacing or downgrading the package.

This is useful to reset system against new set of packages after updating repositories.


Upgrade all other packages than the ones listed. This inverts the given package name list to mean packages that should not be upgraded.

-l,  --latest

Always choose the latest package by version. However, the versions considered are based on the package pinning. Primarily this overrides the default heuristic and will cause an error to displayed if all dependencies cannot be satisfied.


Do not do an early upgrade of the 'apk-tools' package.


Prune the world by removing packages which are no longer available from any configured repository.


Only perform a self-upgrade of the 'apk-tools' package.



apk-cache - Man Page

manage a local cache of package files


apk cache [<options>...] clean

apk cache [<options>...] download

apk cache [<options>...] sync


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

apk cache download will fetch package files from the repositories and store them in the cache, which must be enabled upfront (see apk-cache(5)).

apk cache clean will remove package files which are no longer necessary, having been made obsolete by new versions or no longer being transitively depended on by packages in world.

apk cache sync performs both operations.


-l,  --latest

Always choose the latest package by version. However, the versions considered are based on the package pinning. Primarily this overrides the default heuristic and will cause an error to displayed if all dependencies cannot be satisfied.

-u,  --upgrade

Upgrade packages and it's dependencies. Normally apk add will avoid changing installed package unless it is required by the newly added packages or their dependencies. This changes the default preference to upgrading the package to the latest installable version.

apk-info - Man Page

print detailed information about packages


apk info [<options>...] packages...

apk info -W file


apk info prints information known about the listed packages. By default, it prints the description, webpage, and installed size of the package (equivalent to apk info -dws).

Each field printed is prefaced by the name of the package and its package version, then the field to be displayed, and a newline. The following lines display the appropriate information, then an empty line terminates that field.

apk info -W file prints the package which owns the specified file.


-a,  --all

List all information known about the package.

-d,  --description

Print the package description.

-e,  --installed

Check package installed status. For each installed package, print it's name. The exit status is the number of given packages not installed. Thus, zero (or success) is returned if all named packages are installed.

-L,  --contents

List files included in the package.

-P,  --provides

List what the package provides.

-r,  --rdepends

List reverse dependencies of the package (all other packages which depend on the package).

-R,  --depends

List the dependencies of the package.

-s,  --size

Print the package's installed size.

-w,  --webpage

Print the URL for the package's upstream webpage.

-W,  --who-owns

Print the package which owns the specified file.


List the package's install_if rule. When the dependencies in this list are satisfied, the package will be installed automatically.


Print the package SPDX license identifier.


List the other packages for which this package is marked as a replacement.


List other packages whose install_if rules refer to this package.


Print active triggers for the package.


apk-list - Man Page

list packages matching a pattern or other criteria


apk list [<options>...] pattern...


apk list searches package indicies for packages matching the given patterns and prints any matching packages.

The patterns are matched with fnmatch(3), which behaves similarly to shell globbing.


-I,  --installed

Consider only installed packages.

-O,  --orphaned

Consider only orphaned packages.

-a,  --available

Consider only available packages.

-u,  --upgradable

Consider only upgradable packages.

-o,  --origin

List packages by origin.

-d,  --depends

List packages by dependency.

-P,  --providers

List packages by provider.


apk-dot - Man Page

generate graphviz graphs


apk dot [<options>...] [pkgmask...]


apk dot renders package dependencies as graphviz graphs.

The graph is generated for the packages matching the masks given, or for every known package if unspecified (this will generate a large and unwieldy graph).



Consider only packages with errors. This is useful for visually reporting e.g. cyclic dependencies and missing packages.


Consider only installed packages.


apk-policy - Man Page

show repository policy for packages


apk policy [<options>...] packages...


apk policy shows apk's repository policy for the specified packages. It prints matching packages and their versions available from configured repositories (see apk-repositories(5)), in order of installation preference.


apk policy does not support any specific options. See apk(8) for global options.


apk-search - Man Page

search for packages by name or description


apk search [<options>...] pattern...


apk search searches all repositories for packages matching at least one pattern. If no pattern is given, it lists all packages in the repository. A pattern matches if it is a case-sensitive substring of the package name.


In addition to the global options (see apk(8)), apk search supports the following options:

-a,  --all

Print all matching package versions. By default, apk only shows the latest version.

-d,  --description

Also search for pattern in the package description. By default, apk does not search package descriptions.

-e,  -x,  --exact

Match package names exactly.


Match by package origin. Shows all packages whose base package name matches pattern exactly. Implies --all and --exact.

-o,  --origin

Print base package name.

-r,  --rdepends

Print reverse dependencies (other packages which depend on the package).

apk-index - Man Page

create repository index file from packages


apk index [<options>...] packages...


apk index creates a repository index from a list of package files. See apk-repositories(8) for more information on repository indicies.

Generally, the resulting index must be cryptographically signed before apk will accept it. See abuild-sign(1) for details.


-d,  --description TEXT

Add a description to the index. Upstream, this is used to add version information based on the git commit SHA of aports HEAD at the time of index generation.

-o,  --output FILE

Output generated index to FILE.

-x,  --index INDEX

Read an existing index from INDEX to speed up the creation of the new index by reusing data when possible.


Disable the warning about missing dependencies. This happens when A, depends on package B, that does not have a provider in the indexed repository.

--rewrite-arch ARCH

Set all package's architecture to ARCH.



apk-fetch - Man Page

download packages from global repositories to a local directory


apk fetch [<options>...] packages...


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


-L,  --link

Create hard links if possible.

-o,  --output DIR

Write the downloaded file(s) to DIR.

-R,  --recursive

Fetch packages and all of their dependencies.

-s,  --stdout

Dump the .apk file(s) to stdout.

Note: this option is incompatible with -o, -R, and the global --progress option.


Simulate the requested operation without making any changes.

Note: this option is unreliable if needed indexes are not up-to-date as this omits refresing or downloading of missing indexes.

apk-manifest - Man Page

Show checksums of package contents


apk manifest [<options>...] packages...


apk manifest prints the checksums of files in the listed packages. One file is printed per line, the checksum first, followed by a space, and then the path to the file.

The checksum itself is printed in the format algorithm:hash. Supported algorithms are:

  • md5
  • sha1

sha1 is used for new packages.


apk manifest does not support any specific options. See apk(8) for global options.

apk-verify - Man Page

verify package integrity and signature


apk verify [<options>...] files...


apk verify verifies the integrity of the package files specified, validating the checksums and cryptographic signature.

apk verify prints a summary of the results on stdout, and exits with status code zero if all packages were successfully verified. If any failed, apk verify exits with a nonzero status.


apk verify does not support any specific options. See apk(8) for global options.

apk-audit - Man Page

audit directories for changes


apk audit [<options>...] directories...


apk audit audits the system or specified directories for changes compared to the package database.

The audit can be done against configuration files only (--backup) to generate list of files needed to be stored in the overlay in run-from-tmps configuration. Alternatively, it can audit all installed files (--system) to e.g. detect unauthorized modifications of system files.

By default, the output format is one file per line, for each modified file. A character is printed indicating the change detected, followed by a space, then the affected path. The changes detected are:

AFile added
dDirectory added
DDirectory added (with non-listed files/subdirs)
MFile metadata changed (uid, gid, or mode)
mDirectory metadata changed
UFile contents modified
XFile deleted
xxattrs changed



Audit configuration files only (default). The list of files to be audited is generated from the masks in protected_paths.d.


Check file permissions too. Namely, the uid, gid and file mode will be checked in addition to the file content.


Print only the packages with changed files. Instead of the full output each modification, the set of packages with at least one modified file is printed.

To repair all packages with modified files, one could use:

apk audit --packages -q | xargs apk fix


Audit all system files. All files provided by packages are verified for integrity with the exception of configuration files (listed in protected_paths.d). This is useful detecting unauthorized file changes.

-r,  --recursive

Descend into directories and audit them as well.

apk-stats - Man Page

show statistics about repositories and installations


apk stats


apk stats prints statistics about installed packages, package repositories, and other information.


apk stats does not support any specific options. See apk(8) for global options.

apk-version - Man Page

compare package versions


apk version [<options>...] [packages...]

apk version -c versions...

apk version -t version1 version2

apk version -I


apk version compares the versions of installed packages against package versions available from repositories (see apk-repositories(5)). It can also be used to validate and compare version strings.

In default mode, if no packages are specified, all installed packages are considered. Otherwise, the comparison is limited to the explicitly listed packages. A summary is printed on stdout, with the difference between package versions being represented as >, =, or <.

Options -c, -I, and -t are mutually exclusive.


These options only apply when checking installed package versions against packages available from the repositories (when neither -c, -t, nor -I are specified).

-a,  --all

Consider packages from all repository tags.

-c,  --check versions...

Check versions for validity. If a given version is invalid, it is printed. Exits with status code zero if all versions are valid, and non-zero otherwise.

-I,  --indexes

Print the version and description for each repository's index. See apk-repositories(5) for more information.

-l,  --limit operand

Limit to packages with output matching given operand. The operand can be specified as any combination of >, =, and <.

-t,  --test version1 version2

Compare two version strings. Does not consult the database. Prints one of >, =, or <, if version1 is, respectively, greater than, equal to, or lesser than version2.



Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

xbps-install  sxhkd ------------ mkdir .config/sxhkd cd .config/sxhkd nano/vim sxhkdrc -------------------------------- XF86AudioRaiseVolume         amixer -c 1 -- sset Master 2db+ XF86AudioLowerVolume         amixer -c 1 -- sset Master 2db- XF86AudioMute         amixer -c 1 -- sset Master toggle alt + shift + Escape         pkill -USR1 -x sxhkd XF86MonBrightnessUp          xbacklight -inc 20 XF86MonBrightnessDown          xbacklight -dec 20 ------------------------------------------------------------- amixer -c card_no -- sset Interface volume run alsamixer to find card no and interface names xbps-install -S git git clone xbps-install -S base-devel libX11-devel libXft-devel libXinerama-devel  vim # FREETYPEINC = ${X11INC}/freetype2 #comment for non-bsd make clean install   cp config.def.h config.h vim config.h xbps-install -S font-symbola #for emoji on statusbar support     void audio config xbps-i

Hidden Wiki

Welcome to The Hidden Wiki New hidden wiki url 2015 http://zqktlwi4fecvo6ri.onion Add it to bookmarks and spread it!!! Editor's picks Bored? Pick a random page from the article index and replace one of these slots with it. The Matrix - Very nice to read. How to Exit the Matrix - Learn how to Protect yourself and your rights, online and off. Verifying PGP signatures - A short and simple how-to guide. In Praise Of Hawala - Anonymous informal value transfer system. Volunteer Here are five different things that you can help us out with. Plunder other hidden service lists for links and place them here! File the SnapBBSIndex links wherever they go. Set external links to HTTPS where available, good certificate, and same content. Care to start recording onionland's history? Check out Onionland's Museum Perform Dead Services Duties. Introduction Points - Clearnet search engine for Tor Hidden Services (allows you

download office 2021 and activate

get office from here open powershell as admin (win+x and a ) type cmd  goto insall dir 1.         cd /d %ProgramFiles(x86)%\Microsoft Office\Office16 2.           cd /d %ProgramFiles%\Microsoft Office\Office16 try 1 or 2 depending on installation  install volume license  for /f %x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x" activate using kms cscript ospp.vbs /setprt:1688 cscript ospp.vbs /unpkey:6F7TH >nul cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH cscript ospp.vbs / cscript ospp.vbs /act Automatic script (windefender may block it) ------------------------------------------------------------------------------------------------------------------- @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - =====================================================================================&