Use case: I ITP etckeeper (https://etckeeper.branchable.com/) which I frequently use on Debian. For fully automatic operation, it requires pre-install and post-install hooks, e.g: /etc/preremove/0p_000_etckeeper_pre-install.sh /etc/postinstall/zp_zzz_etckeeper_post-install.sh This patch adds the missing functionality to run the pre-install hook. It is limited to /etc/preremove/0p_* because there is possibly no use case for /etc/preremove/zp_*. 'class Perpetual0RemoveFindVisitor' is borrowed from postinstall.cc and modified. It still uses the ugly pre-C++11 hack to disable copy-ctor and operator=. Possible refactoring like merging all 3 mostly similar visitors into one (or if C++11 is now allowed, use lambda functions instead) are left for later. -- Regards, Christian