How do I fix "Unable to delete object" errors with Object Storage?

Linode Staff

I'm trying to delete an object from my Object Storage bucket, and I'm receiving the following error:

Unable to delete object

How do I delete the object?

2 Replies

This error is typically caused by versioned objects that are hidden in your bucket. You can follow the guidance in our guide on bucket versioning. The guide contains instructions for using Cyberduck or the AWS CLI.

Those versioned objects can be a pain to find sometimes. Good news is, it's possible to create and delete lifecycle policies to automatically files after a set period of time. If you love the command line, you can do this with s3cmd. Otherwise Cyberduck also allows you to do this.

For s3cmd, you'll need to create an XML file; this example would delete all objects in the bucket after one day:

<LifecycleConfiguration>
    <Rule>
        <ID>delete-all-objects</ID>
        <Prefix></Prefix>
        <Status>Enabled</Status>
        <Expiration>
            <Days>1</Days>
        </Expiration>
    </Rule>
</LifecycleConfiguration>

Then you can upload the lifecycle policy to your bucket with the following command:

s3cmd setlifecycle lifecycle_policy.xml s3://lifecycle-policy-example

For Cyberduck, there's an option in the S3 bucket settings of the bucket you want to enforce this on.

Lifecycles will make your life so much easier if you're hunting for old files all the time. Good luck!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct