Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2021 10:41 AM
I have a bunch of libraries that I want to uninstall. All of them are marked as auto-install.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2021 10:43 AM
1) Find the corresponding library definition from an existing cluster using "libraries/cluster-status?cluster_id=<cluster_id>".
$ curl -X GET 'https://cust-success.cloud.databricks.com/api/2.0/libraries/cluster-status?cluster_id=1226-232931-cuffs129' -H 'Content-Type: application/json' -H "Authorization: Bearer MY_TOKEN"
{"cluster_id":"1226-232931-cuffs129","library_statuses":[{"library":{"pypi":{"package":"pyhive"}},"status":"INSTALLED","is_library_for_all_clusters":true}]}2) Use "libraries/uninstall-library-on-all-clusters" to uninstall library using definition found with step 1:
$request_body=$(cat <<EOF
{
"library": {
"pypi": {
"package": "pyhive"
}
}
}
EOF
)
$ curl -X POST 'https://cust-success.cloud.databricks.com/api/2.0/libraries/uninstall-library-on-all-clusters' -H 'Content-Type: application/json' -H "Authorization: Bearer MY_TOKEN" -d "$request_body"3) Verify the library status from UI. The running clusters would need to be restarted to uninstallation to take into effect.