Deleting a Multipart Upload from Object Storage

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

    1. On the Buckets list page, select the Object Storage bucket that you want to work with. If you need help finding the list page or the bucket, see Listing Buckets.
    2. On the details page, select Management and find the Uncommitted multipart uploads section.
      Default filter is applied to hide uploads newer than 7 days. Remove the applied filter to view the complete list.
    3. Select the uploads that you want to delete, and then select Delete.
      To bulk delete all the uncommitted multipart uploads, select the checkbox in the header row to select all, and then select Delete.
    4. When prompted, confirm the deletion.
    The uncommitted multipart upload you deleted no longer appears in the list.
  • 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.

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

    Deleting 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.

  • 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.