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.
To complete this task, you must have the
Compute_Operationsrole. 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.
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.
- 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.
- Click the Images tab.The Private Images page is displayed.
- 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.
- From the 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.
At any time, you can register the machine image again in Compute Classic and then use the image to launch instances.
For instructions to permanently remove a machine image file from Oracle Cloud Infrastructure Object Storage Classic, see the Deleting Machine Image Files from Oracle Cloud Infrastructure Object Storage Classic tutorial.