When you create a new query in Databricks, it gets the name New Query 2025-10-02 8:25am
. After a while, you will have a bunch of these queries that most likely are not needed. It seems like there's no way how to clean them easily from the web UI. But, using the CLI it is straightforward:
databricks queries list -o json \
| jq -r '.[] | select(.display_name | startswith("New Query ")) | .id' \
| while read -r query_id; do
databricks queries delete "$query_id"
done
⚠️ WARNING ⚠️: Run this with caution! It can delete queries that you need!
Top comments (0)