Deleting a Volume

You can delete a volume that you no longer need to free up your quotas of resources. A deleted volume cannot be retrieved later.

Deleting a Volume Using Cockpit v2

Before you begin: Ensure that you no longer need the data stored on the volume you want to delete or that it is saved elsewhere (on another volume or in a snapshot), as you will not be able to retrieve the deleted volume.

  1. Click inside the Volumes dashboard to make checkboxes appear.

  2. Check the box of the volume you want to delete.

    The volume must be in the available state to be deleted.

    Multiselection is available.

    The volume is selected and an action menu is displayed.

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

  4. Click Delete Volumes.
    The volume is deleted.

Deleting a Volume Using OSC CLI

Before you begin: Ensure that you no longer need the data stored on the volume you want to delete or that it is saved elsewhere (on another volume or in a snapshot), as you will not be able to retrieve the deleted volume.

The DeleteVolume command deletes a specified Block Storage Unit (BSU) volume.
You can delete available volumes only, that is, volumes that are not attached to a virtual machine (VM).

Request sample
$ osc-cli api DeleteVolume --profile "default" \
    --VolumeId "vol-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.

  • VolumeId: The ID of the volume you want to delete.

The DeleteVolume command returns the following elements:

  • ResponseContext: Information about the context of the response.

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

Deleting a Volume Using AWS CLI

Before you begin: Ensure that you no longer need the data stored on the volume you want to delete or that it is saved elsewhere (on another volume or in a snapshot), as you will not be able to retrieve the deleted volume.

To delete a volume, use the delete-volume command following this syntax:

Request sample
$ aws ec2 delete-volume \
    --profile YOUR_PROFILE \
    --volume-id vol-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.

  • volume-id: One or more volume IDs.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The delete-volume command returns a result as follows:

  • return: If true, the volume is deleted.

Result sample
{
    "return": "true"
}

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.