manage delete-olm-artifacts

Important: IBM Cloud Pak® for Data Version 4.6 will reach end of support (EOS) on 31 July, 2025. For more information, see the Discontinuance of service announcement for IBM Cloud Pak for Data Version 4.X.

Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.6 reaches end of support. For more information, see Upgrading IBM Software Hub in the IBM Software Hub Version 5.1 documentation.

Remove the OLM artifacts for the specified components. The artifacts include catalog sources, cluster service versions, and operator subscriptions.

Extended description

Important: Before you run the delete-olm-artifacts command, ensure that you uninstall the software that depends on the artifacts by running the delete-cr command.
Run the delete-olm-artifacts command to completely remove the software from the cluster. The delete-olm-artifacts removes the following OLM artifacts:
  • Catalog sources
  • Cluster service versions
  • Operator subscriptions

You can remove OLM artifacts in a batch by specifying a comma-separated list of components, or you can remove OLM artifacts for individual components.

Syntax

cpd-cli manage delete-olm-artifacts \
[--components=<comma-separated-list-of-component-names>] \
[--cpd_operator_ns=<project-name>] \
[--preview=true|false] \
[-vv][-vv][-vvv]

Arguments

The delete-olm-artifacts command has no arguments.

Options

Option Description
--components A comma-separated list of the components for which you want to delete the OLM artifacts.
Status
Optional.
Important: If you omit this option, the OLM artifacts for all of the components are removed.
Syntax
--components=<comma-separated-list-of-component-names>
Default value
No default value. The list depends on which OLM artifacts that you want to remove.
Valid values
For the list of components, see Component IDs.

You can specify individual components or a comma-separated list of components.

--cpd_operator_ns Specialized installations only. The project (namespace) where the IBM Cloud Pak for Data operators exist.
Status
You must specify this option if you installed the Cloud Pak for Data operators in a separate project from the IBM Cloud Pak foundational services operators.
Syntax
--cpd_operator_ns=<project-name>
Default value
No default. User-defined.
Valid values
The name of the project (namespace) where the Cloud Pak for Data operators are installed.
--preview Preview the commands that run when you issue this CLI command.

The command issues a series of oc commands. You can optionally see the list of oc commands that are associated with the command.

The oc commands are saved to the preview.sh file in the cpd-cli-workspace/olm-utils-workspace/work directory.

Status
Optional.
Syntax
--preview=true|false
Default value
false

If you omit this option, the default value is used.

Valid values
false
Run the commands to apply the changes to your cluster.
true
Preview the commands without running them.

You can optionally copy the oc commands from the output and run them yourself. However, this method is not recommended. When you run the commands manually, you do not have access to the additional helper scripts that are included in the underlying Ansible® playbook.

-v
-vv
-vvv
Display verbose output.

Options are listed from least verbose to the most verbose.

Status
Optional.
Syntax
Verbose output
-v
Very verbose output
-vv
Most verbose output
-vvv
Default value
Not applicable.
Valid values
Not applicable.

Examples

Note: The following example uses the installation environment variables.

Use a script to create environment variables with the correct values for your environment. For more information, see Best practice: Setting up install variables.

Delete the OLM artifacts for all of the components
For an express installation, where all of the operators are installed in the same project (namespace)
cpd-cli manage delete-olm-artifacts
For a specialized installation, where the Cloud Pak for Data operators are installed in a separate project (namespace)
cpd-cli manage delete-olm-artifacts \
--cpd_operator_ns=${PROJECT_CPD_OPS}
Delete the OLM artifacts for the Watson Query component
For an express installation, where all of the operators are installed in the same project (namespace)
cpd-cli manage delete-olm-artifacts \
--components=dv
For a specialized installation, where the Cloud Pak for Data operators are installed in a separate project (namespace)
cpd-cli manage delete-olm-artifacts \
--components=dv \
--cpd_operator_ns=${PROJECT_CPD_OPS}
Preview the oc commands to delete the OLM artifacts for the Watson Query component
For an express installation, where all of the operators are installed in the same project (namespace)
cpd-cli manage delete-olm-artifacts \
--components=dv \
--preview=true
For a specialized installation, where the Cloud Pak for Data operators are installed in a separate project (namespace)
cpd-cli manage delete-olm-artifacts \
--components=dv \
--cpd_operator_ns=${PROJECT_CPD_OPS} \
--preview=true