Unversioning an Image

Find out how to unversion an image in Container Registry.

When you want to clean up the list of images in a repository without actually deleting images, you can remove the version identifier from images in Oracle Cloud Infrastructure Registry (also known as Container Registry). Removing version identifiers is referred to as 'unversioning'.

Your permissions control the images in Container Registry that you can unversion (see Policies to Control Repository Access). You can unversion images in repositories you've created, and images in repositories that the groups to which you belong have been granted access by identity policies. If you belong to the Administrators group, you can unversion images in any repository in the tenancy.

  • To unversion an image in Container Registry:

    1. Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Container Registry.
    2. Select the region that contains the registry.
    3. Select the compartment that contains the image.

      The Repositories and images field lists the repositories in the selected region and compartment to which you have access.

    4. Click the plus (+) button beside the name of the repository that contains the image you want to unversion.

      Below the name of the repository, the images in the repository are listed, identified by the version identifier of each image.

    5. Click the name of the image that you want to unversion.
    6. On the Versions tab, click Remove version, and confirm that you want to remove the version identifier.
    Tip

    To view images with no version identifiers in a repository, select Include unversioned images.
  • Use the oci artifacts container image remove-version command and required parameters to unversion an image:

    oci artifacts container image remove-version --image-id <image-ocid> --image-version <version> [OPTIONS]
    For example:
    oci artifacts container image remove-version --image-id ocid1.containerimage.oc1.phx.0.ansh81vru1zp.aaaaaaaalqzjyks... --image-version 1.0

    For a complete list of flags and variable options for CLI commands, see the Command Line Reference.

  • Run the RemoveContainerVersion operation to unversion an image.