apk-fix(8) System Manager's Manual apk-fix(8)

# [NAME](#NAME)

apk fix - repair packages or system

# [SYNOPSIS](#SYNOPSIS)

**apk fix** \[&lt;*options*&gt;...] \[*packages*...]

# [DESCRIPTION](#DESCRIPTION)

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

# [OPTIONS](#OPTIONS)

**apk fix** supports the commit options described in [**apk**(8)](/man/os/apk-tools/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.

**--directory-permissions**

Reset all directory permissions.

2026-10-27

---

Document: apk-fix(8) from apk-tools 2.14.12-r0 (Chainguard OS)
Source: https://gitlab.alpinelinux.org/alpine/apk-tools.git
