To free up some space in your slack workspace and having to delete each file by hand
To run the app you first need a legacy token from slack for your workspace.
Then download the cleanSlack.js
file and run it via Node.js.
By default the script will delete files older than a year. You can change that in the TIMESTAMP
variable.
cd path/to/cleanSlack.js
token=xxxxxxxxxxxxxxxxxxxxxxxxxx node cleanSlack.js
This will run the script and delete each file one by one until done.
This doesn't seem to fully work... first pass I got 100 files deleted, second pass 0, third pass 15, ... keeps returning 0 and then a handful etc. I used https://www.npmjs.com/package/slack-delete-files and it removed 900 in one pass.