How to get current running version of a package in dpkg postinst and preinst script

by user3038057   Last Updated November 20, 2017 09:02 AM

I am creating a debian package that discard some database operations carried out in postinst script of the package if its previous version is installed. I googled and I find it for RPM https://stackoverflow.com/questions/13740254/rpm-build-spec-file-i-want-to-check-rpm-is-being-install-or-update but I could not find for debian.

I am wondering if there is an equivalent variable or something of %pre[un] or %post[un] for debian ?

Regards,



Related Questions



Is it safe to install debian packages on ubuntu?

Updated March 14, 2017 22:02 PM