---
name: "apk-fix"
section: "8"
platform: "linux"
package: "apk-tools"
version: "3.0.8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/apk-fix"
---

# apk-fix(8)

repair packages or system

## NAME

apk fix - repair packages or system

## SYNOPSIS

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

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

**apk fix** supports the commit options described in [**apk**(8)](/apk/8.md), as well as the following options:

- **--depends**, **-d**

  Also fix dependencies of specified packages.

- **--directory-permissions**

  Reset all directory permissions.

- **--reinstall**, **-r**

  Reinstall packages (default).

- **--upgrade**, **-u**

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

- **--xattr**, **-x**

  Fix packages with broken xattrs.
