def METHOD_NAME(self, root):
    # if directory has structure of a job directory, purge (sanity check)
    if os.path.exists(f"{root}/{self.name}/.started"):
        shutil.rmtree(f"{root}/{self.name}")
        g.message(f"Purged {root}/{self.name}")
    else:
        # otherwise only remove if empty
        try:
            os.rmdir(f"{root}/{self.name}")
        except OSError:
            g.message("Directory was not empty")