Back to top

Removing a service completely from CPBM

The CPBM installer has a script which can be used to completely remove a service from the CPBM database, including service instances, products, product bundles, channel/account/user/subscription handles, invoice, invoice items, subscriptions, service notifications, and so on. The purpose of the script is to remove any service if it is added for testing and is no longer required. This script has some limitations and hence, should not be run in a production environment.

Location of the script is: {CPBM_TAR}/etc/

Note: It is important to note the following before you run the script:
  • This script expects the database password as plain text in the file.
  • This action will completely delete the service and all its instances.
  • This will result in data mismatch in historical/current account statements.
  • This action is irreversible and should not be used for production.
  1. Stop the CPBM server:

    service cloud-portal stop

  2. Run the script


  3. [Optional - To remove the connector]: Remove the connector from com.citrix.cpbm.connector.plan:
    1. Open the plan com.citrix.cpbm.connector.plan available at /usr/share/vts3/connectors/, and remove the line that has the required connector.
    2. Delete the connector from directory /usr/share/vts3/connectors/
  4. Start the CPBM server

    service cloud-portal start

Note: If you skip the optional Step 3, then the service will re-appear as a new service after CPBM restarts.

The service and service instance ID can be fetched from the "id" column in the service and service_instance table of the cloud_portal database.