Delete Workspace
Learn how to delete a workspace.
In cases where your workspace has become redundant, and you no longer need it, you can delete it from your Harness account. As a safeguard, Harness has several confirmation steps to ensure that workspaces aren't mistakenly deleted.
Deleting a workspace will remove your workspace, along with it's associated state file from Harness, but will not remove any of your resources.
Resources are only destroyed if you run your workspace through a destroy pipeline.
Prerequisites
Ensure that the resources associated with your workspace are no longer needed.
Your workspace must be in an
inactivestatus
If your workspace already has an inactive status, you can delete a workspace via the Harness API destroy-workspace endpoint.
curl -i -X DELETE \
https://apidocs.harness.io/openapi-merged/iacm/api/orgs/{org_id}/projects/{project_id}/workspaces/{workspace_id} \
-H 'Harness-Account: {harness_account_id}' \
-H 'x-api-key: {api_key}'Last updated
Was this helpful?