post_remove() {
# Python writes its caches under /usr/lib/dibab when root runs the tool; the package manager does
# not know them and they would keep the package directories from being closed.
if [ -d /usr/lib/dibab ]; then
    find /usr/lib/dibab -name __pycache__ -type d -prune -exec rm -rf {} +
    find /usr/lib/dibab -depth -type d -empty -delete
fi
echo "dibab: package removed. Your files are NOT removed, because"
echo "Dibab never deletes a document and its journal is what makes"
echo "--rollback possible. They stay where they are:"
echo "  ~/.config/dibab/ (your configuration)"
echo "  ~/.local/state/dibab/ (state, journal and session reports)"
echo "  the OAuth2 token file and the journal that your configuration designates"
echo "  the destination directories that your configuration designates; your documents are never deleted there"
echo "Delete them yourself if you do not plan to reinstall dibab."
}
