7

s3cmd s3://MYBUCKET/FOLDER does not work. (folder is empty)
s3cmd s3://MYBUCKET/FILE does not work.

Output of both commands is "File FILE sucessfully deleted", yet the file remains on the bucket.

Deleting with the S3 Webinterface works just fine.

2 Answers2

9

It looks like you have the syntax wrong (although it's possible you just typed it into this thing wrong).

From the S3 Tools documentation it looks like you want something like this:

s3cmd del s3://BUCKET/OBJECT

and

s3cmd del -r s3://BUCKET/FOLDER

Typically you need to use the -r, or recursive, flag to delete folders.

If that doesn't work, check that your permissions and keys are correct.

paranoid
  • 246
  • 1
  • 3
0

This is what worked for me.

> s3cmd  ls s3://BucketName/foldername_prefix* |awk '{print $2}' | while read files; do s3cmd  rm -r $files; done
proutray
  • 101
  • 2