---
name: "apk-mkpkg"
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-mkpkg"
---

# apk-mkpkg(8)

create apkv3 package files

## NAME

apk mkpkg - create apkv3 package files

## SYNOPSIS

**apk mkpkg** \[\<*options*\>...\]

## DESCRIPTION

**apk mkpkg** creates a package file from given metadata and data files.

## OPTIONS

- **--compat** *APK\_VERSION*

  Produces packages compatible with given apk versions. The default currently is **3.0.0\_pre1**.

- **--files**, **-F** *PATH*

  Specify the build root path from where the files are collected from to be included in the package.

- **--info**, **-I** *KEY:VALUE*

  Specify metadata for the package. Assigns a metadata field *KEY* with the value *VALUE*. Refer to [**apk-package**(5)](/apk-package/5.md) for the list of APKv3 metadata fields. This can assign to either "package info" or "package" metadata field.

- **--output**, **-o** *FILE*

  Specify the *FILE* as the output file name. If not specified, a default name will be deduced from the package metadata fields.

- **--rootnode**\[=**BOOL**\]

  Deprecated alias to set compat version. **yes** resolves to **--compat=3.0.0\_pre1** and **no** to **--compat=3.0.0\_pre3**.

- **--script**, **-s** *TYPE:SCRIPT*

  Add the specified **SCRIPT** with the **TYPE**. Refer to [**apk-package**(5)](/apk-package/5.md) **PACKAGE METADATA** / **scripts** for list of scripts types and when they are executed.

- **--stdout**

  Output resulting package to stdout.

- **--trigger**, **-t** *TRIGGER*

  Append *TRIGGER* path specification to list triggers which affect when the **trigger** script is executed.

- **--xattrs**\[=**BOOL**\]

  Specify if xattrs should be included in the metadata.
