April 17, 2016
Mass Deleting Files from Slack
Slack comes with limited file storage, so you eventually run out of space. Deleting files isn’t easy though: there is no way to bulk delete them using the web interface.
Slack forces you to delete one by one.
And although Slack can force humans, it can’t force JavaScript. So JavaScript to the rescue!
How to delete multiple files from Slack
In order to free up space, you’ll need;
- Node.js version 5 or later;
- A Slack token, which you can get from Slack API docs;
- A terminal.
Installing
Open your terminal and install slack-delete-files
package globally using Node Package Manager:
$ npm install -g slack-delete-files
Running
$ slack-delete-files
You’ll be asked for your Slack token and whether you want to delete all files or only files older than 30 days.
Done!
Your space is probably back!
After deleting, you can uninstall the package:
$ npm uninstall -g slack-delete-files