---
title: "Comment by Nalaka Wanniarachchi on \"Nuke Fabric Workspace\" | Hashnode"
description: "Great! If we want to delete items from a different workspace instead of the current one, we can change the code as follows. from tqdm import tqdm import sempy.f"
url: "https://hashnode.com/posts/nuke-fabric-workspace/67b4aa6fbe92a9cb0dab825f/comment/67b5664f5a489e8de388c05b"
---

[Discussion](https://hashnode.com/posts/nuke-fabric-workspace/67b4aa6fbe92a9cb0dab825f)

Comment [Nuke Fabric Workspace](https://hashnode.com/posts/nuke-fabric-workspace/67b4aa6fbe92a9cb0dab825f)

[Nalaka Wanniarachchi](https://hashnode.com/@nalakan)

[Feb 19, 2025](https://hashnode.com/posts/nuke-fabric-workspace/67b4aa6fbe92a9cb0dab825f/comment/67b5664f5a489e8de388c05b)

Great! If we want to delete items from a different workspace instead of the current one, we can change the code as follows.

from tqdm import tqdm import sempy.fabric as fabric

def nuke\_workspace(workspace\_name): workspace\_id = fabric.resolve\_workspace\_id(workspace\_name) items = fabric.list\_items(workspace=workspace\_id) items\_to\_delete = items\['Id'\] client = fabric.FabricRestClient() print(f"{len(items\_to\_delete)} items will be deleted in workspace {workspace\_name}") for item in tqdm(items\_to\_delete, desc="Deleting items"): client.delete(f"/v1/workspaces/{workspace\_id}/items/{item}") remaining\_items = fabric.list\_items(workspace=workspace\_id)\['Display Name'\].to\_list() print(f"Remaining items in workspace {workspace\_name}: {remaining\_items}")

workspace\_name = "Enter\_WS\_Name"

nuke\_workspace(workspace\_name)
