Coincidentally (or not), the package manager, namely
dpkg, can be instructed to ignore placing files in specific directories while installing packages.
To do that, create in the
/etc/dpkg/dpkg.cfg.d directory a file
01nodoc having as contents:
aptitude also honour those configurations, and as such, when installing any package, the corresponding files that would be installed in that directories are ignored.
Please do note however that this feature does not delete files retroactively; if they were installed at any point in time before configuring the exclusions, they have to be removed manually.
If however you want to use a subdirectory of an excluded path, use a
path-include directive with a more specific path before the
See also Save disk space by excluding useless files with dpkg