Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A multithreaded Ruby script to quickly delete a very large Amazon S3 bucket

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.markdown
Octocat-spinner-32 s3nuke
README.markdown

S3NUKE

"I say we take off and nuke the site from orbit. It's the only way to be sure."
-- Ripley, Aliens

s3nuke is a single-file Ruby script to delete very large Amazon S3 buckets. It uses multiple threads to retrieve and delete the individual objects in a bucket efficiently regardless of their number. In the use case for which the author wrote it, a bucket containing 260,000 files was deleted in a matter of minutes.

Installation

Obviously you'll need Ruby. Ruby 1.9 will work much faster because of the native thread implementation. This script will probably work in 1.8, but the author hasn't tested it and doesn't care to.

The right_aws gem is the only gem requirement. As of early September 2009, the latest 'official' version of the gem was still broken in Ruby 1.9; however, you can retrieve a patched version from Github:

sudo gem install dmarkow-right_aws --source http://gems.github.com

After that, just clone or download this script, chmod 755 s3nuke for luck, and run it to view the options.

Obvious Warning

Keep in mind that this is a script intended to delete a very large S3 bucket very quickly. You will not be prompted to ask you if you're sure. There is no undo.

Do not taunt Happy Fun Script.

License

This script is released under the Apache License, version 2.0. I really don't care what you do with it, so long as "sue me" is not on the agenda.

Credits

I'm Steve Eley. I work for the American Academy of Religion and wrote this on their dime. If you're a religious scholar you've heard of AAR. If you're not, don't worry about it.

If you like science fiction, check out Escape Pod for free audio short stories.

Have Fun.

Something went wrong with that request. Please try again.