+# make sure to drop from grml-small what's unnecessary:
+if ifclass GRML_SMALL ; then
+ for pkg in groff-base info locales man-db manpages nano; do
+ $ROOTCMD dpkg --purge $pkg || true
+ done
+fi
+
+# remove /usr/share/doc, /usr/share/info,... only in class REMOVE_DOCS:
+# (important: remove them *after* deinstalling packages, otherwise
+# removing packages might fail due to lack of /usr/share/man/...)
+if ifclass REMOVE_DOCS ; then
+ cp /etc/grml/fai/grml/grml_cleanup_chroot.remove_docs $target/root/
+ $ROOTCMD /root/grml_cleanup_chroot.remove_docs
+ rm $target/root/grml_cleanup_chroot.remove_docs
+fi