rmdir the directory is not empty python code example Example: python dlete folder import shutil shutil.rmtree('/folder_name')