def METHOD_NAME(persistence_dir_name):
    """Delete all persistence data from the persistence_dir."""
    for filename in os.listdir(persistence_dir_name):
        if filename == 'backup':
            continue
        file_path = os.path.join(persistence_dir_name, filename)
        try:
            if not os.path.isdir(file_path):
                msg = 'The aminer persistence directory should not contain any files.'
                print(msg, file=sys.stderr)
                logging.getLogger(DEBUG_LOG_NAME).warning(msg)
                continue
            shutil.rmtree(file_path)
        except OSError as e:
            msg = f"Failed to delete {file_path}. Reason: {e}"
            print(msg, file=sys.stderr)
            logging.getLogger(DEBUG_LOG_NAME).error(msg)