Skip to main content

keep your team under the file upload limit

Project description

For free tier memberships, Slack has a limit of 5gb for file uploads, this program wipes out old files.


pip3 install slack-bulkdelete

will create a new command slack-bulkdelete


Create a configuration file with the Slack API token for a personal account that has administrative privileges. (Bot accounts will not work.)

Acquire a WEB API token for the Group Manager account.

The API token is of the form xoxp-nnnnnnnnnn-nnnnnnn-nnnnnnnnn-aaaaaa.

Put the token, in quotes, in $HOME/.slack_api_token or the configuration file you specify on the command line. This file is a json format file, but only has the one entry.


Before letting it run for real, try using –dry-run to see what files will be deleted and saved.

usage: [-h] [-C CONFIG_PATH] [-n] [-u USERS] [-a MAX_AGE]
                   [-s MIN_SIZE] [-p]

optional arguments:
  -h, --help            show this help message and exit
  -C CONFIG_PATH, --config-path CONFIG_PATH
                        configuration info (default: ~/.slack_api_token)
  -n, --dry-run         just simulate the deletes
  -u USERS, --user USERS
                        limit delete to user
  -a MAX_AGE, --max-age MAX_AGE
                        maximum age in days (default: 30)
  -s MIN_SIZE, --min-size MIN_SIZE
                        minimum size (in kb) of file to delete (default: 200)
  -p, --pinned          include pinned files (you don't want this!)


Python 3 has some issues with Unicode encoding if the LANG environment variable is not set properly before the interepreter executes code. Make sure that LANG is set to a utf-8 encoding such as C.utf-8 or EN_us.utf-8.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for slack-bulkdelete, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size slack_bulkdelete-1.1.0-py3-none-any.whl (6.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size slack-bulkdelete-1.1.0.tar.gz (17.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page