Debian Version Comparison
Compare two Debian package versions the way dpkg does. Enter the versions as they appear in a Version: field — epoch, upstream version and Debian revision — and read which one is later, which part decided it, and why.
Comparison detail
| Part | Version A | Version B | Result |
|---|
A Debian version is an optional epoch, an upstream version and an optional Debian revision: epoch:upstream-version-debian-revision. The epoch is an unsigned whole number, assumed to be zero when it is missing, and it is compared first. The upstream version and the Debian revision are then compared with the same rule, left to right: first the run of non-digit characters, compared so that a tilde sorts before everything including the end of the string and letters sort before every other character, then the run of digits, compared as numbers with leading zeros ignored. dpkg breaks the string at its last hyphen, so a revision may itself contain dots and plus signs. A missing revision compares as an empty string, which is why 1.0 equals 1.0-0 and sorts before 1.0-1. dpkg itself is not consulted: the comparison is implemented in your browser from the published algorithm, so a version dpkg would refuse may be refused here with a message instead of a result, and an empty field is refused rather than compared as an empty string. Nothing is sent, stored or uploaded.