NOTE: This uses a deprecated "Legacy token" from the Slack API. Not sure how long they will be honored and what might be done to update. - crit
DON'T COMMIT API TOKENS.
This simple little program breaks about a million basic security rules to delete outdated files from your Slack domain.
More warnings, and information on how to set this up, are available in creds.py.
This is largely taken from https://gist.github.com/thesoftwarejedi/d78af9ee12b7f7a9d3e7
The bulk of the credit goes to @thesoftwarejedi.