.\" Generated by scdoc 1.11.5 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "apk\-fetch" "8" "2026\-08\-31" .PP .SH NAME .PP apk fetch \- download packages from global repositories to a local directory .PP .SH SYNOPSIS .PP \fBapk fetch\fR [<\fIoptions\fR>.\&.\&.\&] \fIpackages\fR.\&.\&.\& .PP .SH DESCRIPTION .PP \fBapk fetch\fR downloads the requested packages from the configured package repositories (see \fBapk\-repositories\fR(5)) to a local directory.\& The current working directory is used as the destination directory unless \fB\-o\fR is specified.\& .PP .SH OPTIONS .PP In addition to the global options (see \fBapk\fR(8)), and query options (see \fBapk\-query\fR(8)) the following options are supported: .PP \fB\-\-built\-after\fR \fITIMESPEC\fR .RS 4 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.\& .PP .RE \fB\-\-link\fR, \fB\-l\fR .RS 4 Create hard links if possible.\& .PP .RE \fB\-\-pkgname\-spec\fR \fIPKGNAME_SPEC\fR .RS 4 Generate downloaded package names with \fIPKGNAME_SPEC\fR specification.\& Does not work with \fB\-\-prune\fR unless the specification starts with \fB${name}[\-_.\&]\fR.\& .PP .RE \fB\-\-output\fR, \fB\-o\fR \fIDIR\fR .RS 4 Write the downloaded file(s) to \fIDIR\fR.\& .PP .RE \fB\-\-simulate\fR[=\fIBOOL\fR] .RS 4 Simulate the requested operation without making any changes.\& .PP \fBNote\fR: this option is unreliable if needed indexes are not up\-to\-date as this omits refreshing or downloading of missing indexes.\& .PP .RE \fB\-\-stdout\fR, \fB\-s\fR .RS 4 Dump the .\&apk file(s) to stdout.\& .PP \fBNote\fR: this option is incompatible with \fB\-o\fR, \fB\-R\fR, and the global \fB\-\-progress\fR option.\& .PP .RE \fB\-\-url\fR .RS 4 Print the full URL for downloaded packages.\& .RE