Bulk Delete Old Slack Uploads

While I do pay for a Slack team account, I also manage a frivolous team with a lot of users on the free plan. The Slack free plans are very generous but can run out of storage space fast and that means no one can share dank memes anymore. This wouldn’t be so bad except Slack does not provide an easy way to delete old file uploads.

Here’s a useful Ruby script by James Martinez that uses the Slack API to deletes a specified number of attachments that are old than 30 days. It works great.

The Slack Deletron bot also looks good but I have not tried it.