blog: Sweep your twitter feed

If you look for an option to delete all your tweets at once on Twitter itself, you will look in vain. There are third-party options like tweetdelete and so on, but why should you allow someone access to your twitter profile, if you can just do it yourself.

You can delete all displayed tweets with a little bit of JavaScript and the developer console in the Chrome / Chromium Browser:

  1. Go to your profile, load a fair amount of tweets by scrolling down and open the developer console (Ctrl + J)
  2. Paste the code below into it and hit Enter (only if you are really sure)
var elements = document.getElementsByClassName("js-actionDelete");
for (var i = 0; i < elements.length; i++) {
    document.getElementsByClassName("btn primary-btn delete-action")[0].click();

var retweetButtons = document.getElementsByClassName("ProfileTweet-actionButtonUndo js-actionButton js-actionRetweet js-tooltip");
for (var j = 0; j < retweetButtons.length; j++) {


This will delete both your own tweets and your retweets.

2015-03-21 19:45