Released:
Bulk delete messages/files on Slack.
Delete slack message and files. Git Clone URL: (read-only, click to copy): Package Base: slack-cleaner.
Project description
Bulk delete messages and files on Slack.
The best wash kit and cleaning products offering a faster, safer, and easier cleaning experience for your dirt bike, motorcycle, atv, side-by-side, truck, jeep, car, boat, and more. Welcome to the PySlackers community! We are a growing and inclusive community of Python enthusiasts ranging from those just starting to those who have built their entire career around it. Our community has a range of resources from our main presence on Slack to our community projects. However, I found slack-cleaner to be bit painful to discover which channels to remove messages from, and it doesn't do much to retry on failures. To solve the first issue, slack's search is pretty useful for finding messages prior to a certain date for a given user.
this is a fork of https://github.com/kfei/slack-cleaner
Install
Install from Pip:
current development version:
If you prefer Docker, there is a pre-built Docker image as well:
Just use docker run -it --rm sgratzl/slack-cleaner -c 'slack-cleaner ...'
for each command or jump into a shell using docker run -it --rm sgratzl/slack-cleaner
.
Slack-cleaner Token
Install for Fedora or EPEL7
@rapgro maintains packages for both Fedora and EPEL7
Arguments
Permission Scopes needed
The permissions to grant depend on what you are going to use the script for.Grant the permissions below depending on your use.
Beyond granting permissions, if you wish to use this script to deletemessages or files posted by others, you will need to be an Owner orAdminof the workspace.
Deleting messages from public channels
channels:history
channels:read
chat:write
(or bothchat:write:user
andchat:write:bot
for older apps)users:read
Deleting messages from private channels
groups:history
groups:read
chat:write
(orchat:write:user
for older apps)users:read
Deleting messages from 1:1 IMs
im:history
im:read
chat:write
(orchat:write:user
for older apps)users:read
Deleting messages from multi-person IMs
mpim:history
mpim:read
chat:write
(orchat:write:user
for older apps)users:read
Deleting files
files:read
files:write
(orfiles:write:user
for older apps)users:read
Usage

Configuring app
The cleaner needs you to give Slack's API permission to let it run theoperations it needs. You grant these by registering it as an app in theworkspace you want to use it in.
You can grant these permissions to the app by:
- going to Your Apps
- select 'Create New App', fill out an App Name (eg 'Slack Cleaner') andselect the Slack workspace you want to use it in
- select 'OAuth & Permissions' in the sidebar
- scroll down to Scopes and select all scopes you need
- select 'Save changes'
- select 'Install App to Workspace'
- review the permissions and press 'Authorize'
- copy the 'OAuth Access Token' shown, and use this token as the
--token
argument to the script
Tips
After the task, a backup file slack-cleaner.<timestamp>.log
will be created in current directory if --log
is supplied.
If any API problem occurred, try --rate=<delay-in-seconds>
to reduce the API call rate (which by default is unlimited).
If you see the following warning from urllib3
, consider to install missingpackages: pip install --upgrade requests[security]
or just upgrade your Python to 2.7.9.
Credits
To all the people who can only afford a free plan. :cry:
Release historyRelease notifications | RSS feed
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.3
0.6.2
0.3.0

0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size slack_cleaner-0.7.4-py3-none-any.whl (12.1 kB) | File type Wheel | Python version py3 | Upload date | Hashes |
Filename, size slack-cleaner-0.7.4.tar.gz (12.9 kB) | File type Source | Python version None | Upload date | Hashes |
Hashes for slack_cleaner-0.7.4-py3-none-any.whl
Algorithm | Hash digest |
---|---|
SHA256 | 603ac46ac5d80a3c586cb13f9c20e3f40f7d81efc341b6b4d1a464f48288dfff |
MD5 | fe4300c5c3c65491e5ba908f0cad5e84 |
BLAKE2-256 | b8e6da23ae0a7340a0ee0cb9c116063e3ec1fc84429a5ccc4ffde460eba6102e |
Slack Cleaner 2
CloseSlack Cleaner
Hashes for slack-cleaner-0.7.4.tar.gz
Slack-cleaner Missing Scope
Algorithm | Hash digest |
---|---|
SHA256 | 32f8b3a3f7a8cb8810e9de8bbfffc195516000ec69526c8cd4c8f785bd3cd643 |
MD5 | f6c81fc3424452404c326d9a61fb2c0b |
BLAKE2-256 | 3b272bdd8b235ab27fc33449f4ce0372587dd9d8aa23fc57aa136e3b6035dfc1 |
