You can use the Cloud Foundry Command Line Interface (cf CLI) to delete service instances.
-
Download and install the cf CLI and log on to Cloud Foundry.
For more information, see Download and Install the Cloud Foundry Command Line Interface and Log On to the Cloud Foundry Environment Using the Cloud Foundry Command Line Interface.
-
Open a command line and log in.
cf l -a <API endpoint>
-
(Optional) List all services and bound apps in your org:
cf services
-
Unbind the service from any application.
cf unbind-service APP_NAME SERVICE_INSTANCE
-
(Optional) List all service keys for your service instance.
cf service-keys SERVICE_INSTANCE
-
Delete any service key from the service instance.
cf delete-service-key SERVICE_INSTANCE SERVICE_KEY
-
Run the following command to delete a service instance:
cf delete-service SERVICE_INSTANCE
Specify the following parameters:
-
SERVICE_INSTANCE
: The name of your service instance. -
APP_NAME
: The name of an application your service instance is connected to. -
SERVICE_KEY
: The name of the service key of your service instance.
-
Related Information