How to bulk delete all messages in Slack

By | April 5, 2019

The quickest way to delete all messages in a slack channel is to use slack-cleaner. You’ll need an API token first so log into slack and then open up this link: https://api.slack.com/custom-integrations/legacy-tokens

Scroll down to “token legacy generator” and you should see some green buttons.

With this token in hand, install slack-cleaner. On mac it is:

> pip install slack-cleaner

Then just run this command

> slack-cleaner --token <TOKEN> --message --channel general --user "*"

You might be rate limited so some deletes may fail. If so, just up arrow and run again.

If you want to delete or technically deactivate users and you are on the free plan, then you are out of luck.

Trying: https://slack.com/api/users.admin.setInactive with the correct parameters will result in:

{

ok“: false
error“: “paid_only

}

2 thoughts on “How to bulk delete all messages in Slack

  1. Konstantin

    Awesome tool! I tried first few Chrome extensions which didn’t do anything useful. Then went an extra mile to install this script which worked like a charm! Thanks to the author!

    Reply
  2. parker

    hello. this slack-cleaner script is very complicated for end-users to use.

    Message Bender is very easy slack cleaner tool to use and i used it many times to delete slack messages on my workspace. it is really successful tool. i recommend you to use it.

    regard!

    Reply

Leave a Reply to parker Cancel reply

Your email address will not be published. Required fields are marked *