.\" 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\-version" "8" "2026\-08\-31" .PP .SH NAME .PP apk version \- compare package versions .PP .SH SYNOPSIS .PP \fBapk version\fR [<\fIoptions\fR>.\&.\&.\&] [\fIpackages\fR.\&.\&.\&] .PP \fBapk version\fR \-c \fIversions\fR.\&.\&.\& .PP \fBapk version\fR \-t \fIversion1\fR \fIversion2\fR .PP \fBapk version\fR \-I .PP .SH DESCRIPTION .PP \fBapk version\fR compares the versions of installed packages against package versions available from repositories (see \fBapk\-repositories\fR(5)).\& It can also be used to validate and compare version strings.\& .PP In default mode, if no packages are specified, all installed packages are considered.\& Otherwise, the comparison is limited to the explicitly listed packages.\& A summary is printed on stdout, with the difference between package versions being represented as \fB>\fR, \fB=\fR, or \fB<\fR.\& .PP Options \fB\-c\fR, \fB\-I\fR, and \fB\-t\fR are mutually exclusive.\& .PP .SH OPTIONS .PP These options only apply when checking installed package versions against packages available from the repositories (when neither \fB\-c\fR, \fB\-t\fR, nor \fB\-I\fR are specified).\& .PP \fB\-\-all\fR, \fB\-a\fR .RS 4 Consider packages from all repository tags.\& .PP .RE \fB\-\-check\fR, \fB\-c\fR .RS 4 Check versions for validity.\& If a given version is invalid, it is printed.\& Exits with status code zero if all versions are valid, and non\-zero otherwise.\& .PP .RE \fB\-\-indexes\fR, \fB\-I\fR .RS 4 Print the version and description for each repository'\&s index.\& See \fBapk\-repositories\fR(5) for more information.\& .PP .RE \fB\-\-limit\fR, \fB\-l\fR \fIoperand\fR .RS 4 Limit to packages with output matching given \fIoperand\fR.\& The \fIoperand\fR can be specified as any combination of \fB>\fR, \fB=\fR, and \fB<\fR.\& .PP .RE \fB\-\-test\fR, \fB\-t\fR .RS 4 Compare two version strings.\& Does not consult the database.\& Prints one of \fB>\fR, \fB=\fR, or \fB<\fR, if \fIversion1\fR is, respectively, greater than, equal to, or lesser than \fIversion2\fR.\& .RE