Deleting a Private Machine Image

When you no longer need a private machine image that you’ve registered in Compute Classic, you can delete the image. Deleting an image removes the image from your Compute Classic account. However, the image file in your Oracle Cloud Infrastructure Object Storage Classic account isn’t deleted. You can register this image in your Compute Classic account again later, if required.

Prerequisites

  • To complete this task, you must have the Compute_Operations role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

  • Make sure that the machine image isn’t used in any orchestration.

    Caution:

    If you delete a machine image that’s used in an orchestration, then when that orchestration is stopped and re-started, the instances won’t be created.

Procedure

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Images tab.
    The Private Images page is displayed.
  3. Go to the image that you want to delete. Make a note of the image name. You might need this later, if you want to register the image again, or if you want to delete this image from your associated Oracle Cloud Infrastructure Object Storage Classic account.
  4. From the menu icon menu, select Delete.

To delete an image using the CLI, use the opc compute machine-image delete command. For help with that command, run the command with the -h option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.

To delete an image using the API, use the DELETE /machineimage/name method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.

Note:

When you delete a machine image from Compute Classic, the image file that’s stored in Oracle Cloud Infrastructure Object Storage Classic is not removed.