$ cat /etc/apt/apt.conf.d/90debsums
DPkg::Post-Invoke { "if [ -x /usr/bin/debsums ]; then /usr/bin/debsums --generate=nocheck -sp /var/cache/apt/archives; fi"; };
The Package debsums
installs an action to generate md5sum lists for packages automatically after a package is installed without already having an own md5sums file..
You could add a similar post install action scanning for and removing the manpages (and info documents) after each install action.
To get the manpages and the owning packages, you need to scan thru all /var/lib/dpkg/info/PACKAGENAME.list
files.
You should update the *.list
files not to mention the removed manpages any longer too.
localepurge
partially does this too. Quoted from apt-cache show localepurge
:
This is a script to recover disk space wasted for unneeded locales,
Gnome/KDE localizations and localized man pages. Depending on the
installation, it is possible to save some 200, 300, or even more mega
bytes of disk space dedicated for localization you will most probably
never have any use for. It is run automagically upon completion of
any apt installation actions.
The most important quote:
Please definitely do abstain from reporting any such bugs blaming
localepurge if you break your system by using it. If you don't know
what you are doing and can't handle any resulting breakage on your own
then please simply don't use this package.
;-D
So just make a full backup and try to write your manpagekiller
...
/usr/share/doc
.