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

# apk-fetch(8)

download packages from global repositories to a local directory

## NAME

apk fetch - download packages from global repositories to a local directory

## SYNOPSIS

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

## DESCRIPTION

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

## OPTIONS

In addition to the global options (see [**apk**(8)](/apk/8.md)), and query options (see [**apk-query**(8)](/apk-query/8.md)) the following options are supported:

- **--built-after** *TIMESPEC*

  Only fetch packages that have buildtime more recent than TIMESPEC. TIMESPEC can be a "YYYY-MM-DD HH:MM:SS" date, or seconds since epoch.

- **--link**, **-l**

  Create hard links if possible.

- **--pkgname-spec** *PKGNAME\_SPEC*

  Generate downloaded package names with *PKGNAME\_SPEC* specification. Does not work with **--prune** unless the specification starts with **${name}\[-\_.\]**.

- **--output**, **-o** *DIR*

  Write the downloaded file(s) to *DIR*.

- **--simulate**\[=*BOOL*\]

  Simulate the requested operation without making any changes.

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

- **--stdout**, **-s**

  Dump the .apk file(s) to stdout.

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

- **--url**

  Print the full URL for downloaded packages.
