A bit late but.. The script preinst is called if no older version or no conflict found before unpacking Also there is this option: dpkg --instdir /path/to/datas datas.deb Just a few ideas...