manage delete-olm-artifacts

Important: IBM Cloud Pak® for Data Version 4.7 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.7 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 for:

  • A single component
  • A set of components by specifying a comma-separated list of components
  • All components in the operators project by specifying the --delete_all_components option

Syntax

cpd-cli manage delete-olm-artifacts \
--cpd_operator_ns=<project-name> \
[--components=<comma-separated-list-of-component-names>] \
[--delete_all_components=true|false] \
[--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, you must specify the --delete_all_components option.
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 The project for the operators for an instance of Cloud Pak for Data.
Status
Required.
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.
--delete_all_components Delete the OLM artifacts for all of the components in the specified project.
Status
Optional.
Important: If you omit this option, you must specify the --components option.
Syntax
--delete_all_components=true|false
Default value
No default value.
Valid values
false
Do not delete the OLM artifacts for components in the project.
true
Delete the OLM artifacts for components in the project.
--preview Preview the commands that run when you issue this CLI command.

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

The oc commands are saved to the preview.sh file in the 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 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.

Table 1: Command options

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 components in the specified project
cpd-cli manage delete-olm-artifacts \
--cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
--delete_all_components=true
Delete the OLM artifacts for the Watson Query component
cpd-cli manage delete-olm-artifacts \
--cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
--components=dv
Preview the oc commands to delete the OLM artifacts for the Watson Query component
cpd-cli manage delete-olm-artifacts \
--cpd_operator_ns=${PROJECT_CPD_INST_OPERATORS} \
--components=dv \
--preview=true