How to remove Databricks default workspace catalog

Gokul Dev 20 Reputation points
2026-12-02T06:41:55.8033333+00:00

I'm using Terraform to provision Unity Catalog–enabled Azure Databricks workspaces. Each workspace automatically gets a default workspace catalog. After a successful terraform destroy, that catalog stays in the metastore.

My provider config sets the force_delete flag so the managed resource group is removed. I expected the default catalog to be deleted along with it, but it's still there. We use a shared metastore, so these orphaned catalogs keep counting against our catalog quota.

To rule out Terraform, I also created a workspace manually. I then deleted it through the Azure portal and through the CLI, both times with force deletion. The default catalog still stayed in the metastore.

My question: Should deleting a workspace also remove its default workspace catalog from the metastore? If not, what's the recommended way to clean these up?

Azure Databricks
Azure Databricks

An Apache Spark-based analytics platform optimized for Azure.

0 comments No comments

Answer accepted by question author
Sedat SALMAN 14,465 Reputation points MVP
2026-12-02T07:05:59.6366667+00:00

Hi Gokul,

Per the docs, a force delete is supposed to remove it. The delete-workspace article says the workspace catalog is kept after a normal delete, and that the portal checkbox to delete the managed resource group, az databricks workspace delete --force-deletion, or Remove-AzDatabricksWorkspace -ForceDeletion also remove the workspace catalog and its data.

What you're describing matches a Databricks KB article: after the workspace storage is permanently deleted, the catalog entry can be left behind in the metastore with no workspace attached. From other workspaces these usually show up greyed out in Catalog Explorer, and you can't change their owner.

You can clean them up with the Databricks CLI, authenticated to any workspace that is still attached to the same metastore:

databricks catalogs delete <workspace-catalog-name> --force

The catalog is named after the workspace by default. Run it as a metastore admin. The workspace catalog is owned by that workspace's admins group, which is a workspace-local group, so once the workspace is gone a metastore admin is the practical way to remove it. --force is needed because the catalog isn't empty (it still has the default schema).

To stop them piling up, you can add that command as a step right after terraform destroy in your pipeline, using an identity that is a metastore admin. Since force delete is documented to remove the catalog and your manual portal and CLI tests show the same result, I'd also open a support case with that repro.

References:

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.