Delete files older than 30 days from your Slack team. Purges public and private files to free up space under the free team storage limit imposed by Slack.
run.sh file is provided - this is my own personal script, provided as an example. If you try to run it, there will likely be errors: I am using my own script to post logs to a Discord webhook. If you manage to successfully configure and run it, logs will be posted in
How to Use
- Set up DeleteFiles on your machine
$ git clone https://github.com/ChaoticWeg/slack-deletefiles && cd slack-deletefiles
$ pipenv install
- Authorize DeleteFiles for your team (see below)
$ python3 -m pipenv run python main.py
Authorizing DeleteFiles for your Team
- Authorize DeleteFiles with the required permissions for your Slack team. Click here to do so.
- You will be redirected to a site that will give you your token - save this token!
deletefiles’ client ID and secret token.
- Copy your OAuth token to a file called
.envinside the folder created by
git cloneduring the install process
- Required to get a list of files from your Slack team
- Required to delete public and private files