Deleting an OMI

You can delete an OUTSCALE machine image (OMI) that you created at any time if you no longer need it.

If you share this OMI with other accounts, this OMI will not be available to them anymore. Snapshots related to the OMI creation process are not deleted.

Deleting an Image Using Cockpit v2

  1. In the Images dashboard, check the box of the image you want to delete.

    Multiselection is available.

    The image is selected.

  2. Click IconTerminate Delete.
    A confirmation dialog box appears.

  3. Click Delete.
    The image is deleted.

Deleting an OMI Using OSC CLI

The DeleteImage command deletes an OUTSCALE machine image (OMI) so that you cannot use it anymore to launch virtual machines (VMs). However, you can still use VMs already launched from this OMI.

Request sample
$ osc-cli api DeleteImage --profile "default" \
    --ImageId "ami-12345678"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • ImageId: The ID of the OMI you want to delete.

The DeleteImage command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Deleting an OMI Using oapi-cli

The DeleteImage command deletes an OUTSCALE machine image (OMI) so that you cannot use it anymore to launch virtual machines (VMs). However, you can still use VMs already launched from this OMI.

Request sample
$ oapi-cli --profile "default" DeleteImage \
    --ImageId "ami-12345678"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • ImageId: The ID of the OMI you want to delete.

The DeleteImage command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Deleting an OMI Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To delete an OMI, use the deregister-image command following this syntax:

Request sample
$ aws ec2 deregister-image \
    --profile YOUR_PROFILE \
    --image-id ami-12345678 \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • image-id: The ID of the OMI you want to delete.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The OMI is deleted.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.