Delete your deployment when you no longer need it to free up resources. You can delete a deployment from a deployment space, or programmatically, by using the Python client or watsonx.ai Runtime APIs.
Before you begin
Copy link to section
You must set up your task credentials by generating an API key. For more information, see Managing task credentials.
Deleting a deployment from a space
Copy link to section
To remove a deployment:
Open the Deployments page of your deployment space.
Choose Delete from the action menu for the deployment name.
Deleting a deployment programmatically
Copy link to section
You can delete a deployment programmatically by using the watsonx.ai Python client library, watsonx.ai Runtime API, or CPDCTL.
Deleting a deployment by using the Python client
Copy link to section
Use the following method to delete the deployment.
client.deployments.delete(deployment_uid)
Copy to clipboardCopied to clipboard
Returns a SUCCESS message. To check that the deployment was removed, you can list deployments and make sure that the deleted deployment is no longer listed.
You can delete your deployment space by using the ml deployment delete command in CPDCTL and passing your deployment space ID. For more information, see CPDCTL command reference.
About cookies on this siteOur websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising.For more information, please review your cookie preferences options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.