manage
delete-images
Extended description
To run this command, the registry must be configured to allow images to be removed.
- The CASE package for the release
that you want to delete (
--release_to_delete
) - The CASE package for the release
that you want to keep (
--release_to_keep
)
The command uses the CASE packages to determine which images can be deleted because they are unique to the release that you want to delete.
Syntax
cpd-cli manage delete-images \
--release_to_delete=<version> \
--release_to_keep=<version> \
--components=<comma-separated-list-of-component-names> \
--target_registry=<registry-URL> \
[--preview=true|false]
Arguments
The delete-images
command has no arguments.
Options
Option | Description |
---|---|
--components |
A comma-separated list of the components that you want to install or
upgrade.
|
--preview |
Preview the commands that run when you issue this CLI
command. The command issues a series of
The
|
--release_to_delete |
The version for which you want to remove unused
images.
|
--release_to_keep |
The version for which you want to keep the
images. The list of images that is associated with this release is used to determine which images must not be deleted.
|
--target_registry |
The URL of the registry that you want to remove the images from.
|
Examples
Use a script to create environment variables with the correct values for your environment. For details, see Best practice: Setting up install variables.
- Remove unused images from your private container registry for the 4.6.0 release after upgrading to the 4.6.1 release
-
cpd-cli manage delete-images \ --release_to_delete=4.6.0 \ --release_to_keep=4.6.1 \ --components=${COMPONENTS} \ --target_registry=${PRIVATE_REGISTRY_LOCATION}
- Preview the
oc
commands to remove unused images from your private container registry for the 4.6.0 release after upgrading to the 4.6.1 release -
cpd-cli manage delete-images \ --release_to_delete=4.6.0 \ --release_to_keep=4.6.1 \ --components=${COMPONENTS} \ --target_registry=${PRIVATE_REGISTRY_LOCATION} \ --preview=true