VERCMP(8)
β¨ VERCMP(8) β¨
okay bestie, welcome to vercmp β the version comparison utility, straight out of the Pacman Manual. she's tiny, she's fierce, and she is literally the reason your package manager knows which version is newer. no cap. π
πΈ NAME πΈ
vercmp β version comparison utility
π¦ SYNOPSIS π¦
vercmp [-h] [--help] <version1> <version2>
π DESCRIPTION π
so what does she actually do? vercmp takes two version numbers and tells you how they relate to each other. the output is literally just a number, and here's the decoder ring:
< 0: if ver1<ver2= 0: if ver1==ver2> 0: if ver1>ver2
that's it. that's the whole vibe check. β¨
π how the comparison actually works π
Version comparison operates like this, and yes you're gonna wanna screenshot this:
Alphanumeric:
1.0a < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0 < 1.0.a < 1.0.1
Numeric:
1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
π epochs, aka the ones who overrule everything π
plot twist: version strings can also carry an epoch value, and that epoch will straight up overrule any version comparison β unless the epoch values are equal. she said "my rules, my house." π
it's written in an epoch:version-rel format. for example, 2:1.0-1 is always greater than 1:3.6-1. always always. π₯
π the pkgrel tea π
ngl this part trips people up, so listen: the pkgrel is only compared if it is available on both versions you hand to this tool. fr fr.
- comparing
1.5-1and1.5will yield0 - comparing
1.5-1and1.5-2will yield< 0as expected
why tho? this is mainly for supporting versioned dependencies that do not include the pkgrel. so it's a feature, not a bug, periodt. π
β¨ OPTIONS β¨
-h,--helpβ Display summary of the available return codes. Must be the first option specified. (yes, literally first, don't try to be cute and put it anywhere else π)
π EXAMPLES π
here's her in action, looking iconic:
$ vercmp 1 2
-1
$ vercmp 2 1
1
$ vercmp 2.0-1 1.7-6
1
$ vercmp 2.0 2.0-13
0
$ vercmp 4.34 1:001
-1
that last one? epoch doing epoch things. ate. π
π SEE ALSO π
pacman(8), makepkg(8), libalpm(3)
See the pacman website at https://archlinux.org/pacman/ for current information on pacman and its related tools.
π BUGS π
Bugs? You must be kidding; there are no bugs in this software. π (iconic confidence, honestly.)
But if we happen to be wrong β and, like, hypothetically we could be β please report them to the issue tracker at https://gitlab.archlinux.org/pacman/pacman/-/issues with specific information such as your command-line, the nature of the bug, and even the package database if it helps. give us the receipts bestie π§Ύπ«Ά
π§ AUTHORS π§
Current maintainers:
- Allan McRae <allan@archlinux.org>
- Andrew Gregory <andrew.gregory.8@gmail.com>
- Morgan Adamiec <morganamilo@archlinux.org>
Past major contributors:
- Judd Vinet <jvinet@zeroflux.org>
- Aurelien Foret <aurelien@archlinux.org>
- Aaron Griffin <aaron@archlinux.org>
- Dan McGee <dan@archlinux.org>
- Xavier Chantry <shiningxc@gmail.com>
- Nagy Gabor <ngaba@bibl.u-szeged.hu>
- Dave Reisner <dreisner@archlinux.org>
- Eli Schwartz <eschwartz@archlinux.org>
For additional contributors, use git shortlog -s on the pacman.git repository.
and that's the whole page, babe. go forth and compare versions responsibly. π¦
Pacman 7.1.0 β dated 2026-10-15 β signing off, mwah π
π¦ where this page comes from
- arch rolling: pacman 7.1.0.r9.g54d9411-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms