Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slack clean all messages (~8K) in a channel

We currently have a Slack channel with ~8K messages all comes from Jenkins integration. Is there any programmatic way to delete all messages from that channel? The web interface can only delete 100 messages at a time.

like image 501
Hann Avatar asked Sep 28 '15 13:09

Hann


People also ask

Can you clear messages from a channel in Slack?

Go to the channel where you want to delete your message and click on the three-dot … icon for More Actions. There you can choose to edit or delete the message. Click on Delete message to delete your message.

How do I clean up a channel in Slack?

From your desktop, open the channel you'd like to delete. Click the channel name in the conversation header. Click Settings, then Delete channel. Select Delete this channel.

How do I clean up Slack messages?

Hover over the message you'd like to delete. Click the three dots icon. Click Delete message. Select Delete to confirm.


1 Answers

I quickly found out there's someone already made a helper: slack-cleaner for this.

And for me it's just:

slack-cleaner --token=<TOKEN> --message --channel jenkins --user "*" --perform

like image 62
Hann Avatar answered Oct 13 '22 22:10

Hann