Comparison package versions
To be sure your package will be upgraded to the latest version you shoult test it. To do it you could use dpkg --compare-versions command. The command requires three argumenst: version and the test operation. For example:
root@lenovo:~# dpkg --compare-versions "9.9+deb9u1+dilos20" lt "10.3+deb10u7+dilos1";echo $?
0
The result returns as the exit code which we can see by echo $? shell command.
The test operations could be:
lt - less than
gt - great than
See the man page on dpkg for more conditions.