How can I clear the channel history?
The channel in question is a private channel created by me and is not (yet) archived.
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityIt'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.
A very fast way to do this is to recreate the channel:
In my case, I archived the old channel afterwards.
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