Bring Forth the Versions The versioning system class is AptPkg::Version, an instance of which may be retrieved using the versioning method of a system object. The class provides methods for comparing package and release versions: compare and rel_compare which act like strcmp, returning a value which is less than, equal to or greater than zero (appropriate for sort routines). $vs->compare('2.3-5', '1:2.0-2') # -1 Also provided is a method to check a specific dependency relation (in this case the PreDepend of debconf on perl-base): $vs->check_dep('5.6.1-7', '>=', '5.6.1-4') # true And a method to return the upstream component of a package version: upstream.