24

How can I clear the channel history?

The channel in question is a private channel created by me and is not (yet) archived.

1

3 Answers 3

8

It's possible to batch delete messages through the Slack archives page, but this only lets you delete one page of messages at a time and does not delete any corresponding file uploads.

A better solution that deletes all messages from channels and/or groups, including file attachments, is this Python library: slack-cleaner2 (this replaces the deprecated slack-cleaner). You'll need to be familiar with the programming language Python to use it.

2
4

A very fast way to do this is to recreate the channel:

  1. Open your channel in Slack
  2. Click the config button and choose "Additional Options"
  3. Choose "Rename the Channel" and name it something (like "old-channel")
  4. Create a new channel with the same name as the original

In my case, I archived the old channel afterwards.

1
  • 9
    Not valid for #general channel. You can not delete it or eliminate people from that channel Feb 26, 2019 at 19:15
2

Now, we can set a private channel or direct message retention policy on Slack.

For example, if you set a retention policy of one day, all messages in the channel or direct message will be deleted after one day.

FYI: Set-private-channel-and-direct-message-retention-policies

1

Not the answer you're looking for? Browse other questions tagged or ask your own question.