apk-cache - Man Page

manage a local cache of package files

Synopsis

apk cache [<options>...] clean

apk cache [<options>...] download

apk cache [<options>...] sync

Description

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.

Options

-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.

Referenced By

apk(8), apk-cache(5).

2021-08-03