.\" Generated by scdoc 1.11.4 .\" 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-upgrade" "8" "2025-12-03" .PP .SH NAME .PP apk upgrade - upgrade installed packages .PP .SH SYNOPSIS .PP \fBapk upgrade\fR [<\fIoptions\fR>.\&.\&.\&] [<\fIpackages\fR>.\&.\&.\&] .PP .SH DESCRIPTION .PP \fBapk upgrade\fR upgrades installed packages to the latest version available from configured package repositories (see \fBapk-repositories\fR(5)).\& When no packages are specified, all packages are upgraded if possible.\& If list of packages is provided, only those packages are upgraded along with needed dependencies.\& .PP If dependencies mentioned in \fB--preupgrade-depends\fR (see \fBapk\fR(8)) match an upgradabable package, a preupgrade step is performed.\& During the preupgrade step, the installed packages matching the preupgrade dependencies are upgraded if possible - their dependencies are enforced (but not upgraded unless required by the dependencies in the new package).\& .PP An implicit preupgrade dependency is generated for the package owning the apk executable.\& .PP .SH OPTIONS .PP \fBapk upgrade\fR supports the commit options described in \fBapk\fR(8), as well as the following options: .PP \fB--available\fR, \fB-a\fR .RS 4 Reset all packages to versions available from current repositories.\& This resets all versioned dependencies in \fIworld\fR (see \fBapk-world\fR(5)).\& Additionally, packages are selected from active repositories if possible even if it means replacing or downgrading the package.\& .PP This is useful to reset system against new set of packages after updating repositories.\& .PP .RE \fB--ignore\fR .RS 4 Upgrade all other packages than the ones listed.\& This inverts the given package name list to mean packages that should not be upgraded.\& .PP .RE \fB--latest\fR, \fB-l\fR .RS 4 Always choose the latest package by version.\& However, the versions considered are based on the package pinning.\& Primarily this overrides the default heuristic and will cause an error to displayed if all dependencies cannot be satisfied.\& .PP .RE \fB--preupgrade\fR[=\fIBOOL\fR] .RS 4 If turned off, disables the preupgrade step.\& .PP .RE \fB--preupgrade-only\fR .RS 4 Perform only the preupgrade.\& .PP .RE \fB--prune\fR .RS 4 Prune the \fIworld\fR by removing packages which are no longer available from any configured repository.\& .RE