Delete All Direct Messages of your Twitter Account at once (or at least try!)

Since Twitter doesn’t provide with a “Delete All Direct Messages” functionality, Here’s a Python script that attempts to delete all the direct messages stored on your Twitter account.

Limitations
The only problem with it is that given the limitations of the Twitter REST API, I was forced to send a request per message to be deleted, and it seems that Twitter will only allow 100 requests per hour (per client).

So in theory you will be able to delete 100 an hour, although I have seen it delete over 400 messages Twitter gets all grumpy on me.

Usage
Just save the script as twitter_delete_direct_messages.py, open a terminal and run it:

[bash]python twitter_delete_direct_messages.py[/bash]

After that just follow the instructions on screen and enjoy as messages get wiped out.

If you find this useful, you can thank me by following me on Twitter.

Get The Script

3 thoughts on “Delete All Direct Messages of your Twitter Account at once (or at least try!)

Leave a Reply

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