-
credits go jackcarter and henry-p
-
copied code from here https://gist.github.com/jackcarter/d86808449f0d95060a40#gistcomment-2272461
-
initial gist from here https://gist.github.com/jackcarter/d86808449f0d95060a40
-
updated code with changes to my preference, file size grater than 0 mb, so deletes all files more than 30 days.
-
copy the files to your laptop/pc
-
get your slack API token >> keep it safe, disable or delete after use <<
-
update the local file with your API token and run
python3 slack-api-delete-files.py
-
remove the token from file
-
disable/revoke the token from your slack API, create a new token next time you needed it