Deleting a Multipart Upload from Object Storage

Cancel and delete an uncommitted or failed multipart upload in Object Storage.

    1. Open the navigation menu and click Storage. Under Object Storage & Archive Storage, click Buckets.
    2. Select the compartment from the list under List Scope. All buckets in that compartment are listed in tabular form.
    3. Click the bucket whose multipart upload you want to delete. The bucket's Details page appears.
    4. Click Uncommitted Multipart Uploads under Resources. The Uncommitted Multipart Uploads list appears. All uncommitted or failed multipart uploads are listed in tabular form. The Hide uploads newer than 7 days filter is enabled by default. Disable the filter to view the complete list.
    5. Select the uploads that you want to delete, and then click Delete. To bulk delete all the uncommitted multipart uploads, select the check box in the header row to select all, and then click Delete.
    6. Confirm the deletion.
  • Use the oci os multipart abort command and required parameters to cancel and delete an uncommitted or failed multipart upload in a bucket:

    oci os multipart abort --bucket-name bucket_name --object-name object_name --upload-id upload_ID [OPTIONS]

    For example:

    oci os multipart abort --bucket-name MyBucket --object-name MyObject --upload-id 0b7abd48-9ff2-9d5f-2034-63a02fdd7afa
    WARNING: Are you sure you want to permanently remove this incomplete upload? [y/N]: y
    Tip

    The CLI interface asks you to confirm the deletion request. To delete without the confirmation prompt, use the --force flag.

    You can also create a lifecycle policy that automatically deletes uncommitted or failed multipart uploads. See Object Lifecycle Management for more information.

    To delete all parts of an uncommitted or failed multipart upload

    #!/bin/bash
    
    BUCKET=$1
    
    oci os multipart list --bucket-name $BUCKET | \
        jq -c '.data | map({'o': .object, 'i': ."upload-id"}) | .[]' | \
        while read JSON; do
            OBJECTNAME=$(echo $JSON | jq '.o' | sed -e 's/\"//g;')
            UPLOADID=$(echo $JSON | jq '.i' | sed -e 's/\"//g;')
            echo Removing Object name $OBJECTNAME, ID $UPLOADID
            oci os multipart abort --bucket-name $BUCKET \
                    --object-name $OBJECTNAME \
                    --upload-id $UPLOADID \
                    --force
        done

    You can also create a lifecycle policy that automatically deletes uncommitted or failed multipart uploads. See Object Storage Object Lifecycle Management for details.

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the AbortMultipartUpload operation to cancel and delete an uncommitted or failed multipart upload in a bucket.

    See Using the Multipart API for more information.