Deleting it all? Deleting it all

There is now a critical mass of people on mastodon to make it feasible as my main social presence (I am @gotofritz@mastodon.coffee). I like leaving without leaving traces behind. That means, remove all my content from there. That means tweets, retweets, media, and likes. Bookmarks can stay as they are private. DMs I had so few I deleted them manually

Deleting all tweets, retweets and media with delete tweet

My first instinct was to go and check the Twitter API document. But before getting started there, I thought I’d look for a free app. And I found one! TweetDelete, it’s called. It’s simple to use, doesn’t require sign in, and gets the job done. It has a limit of 3200 tweets, but I believe that limit is daily. It must be. So you have to go back to it every day until you are done.

Deleting all twitter likes with JS on the inspector

The one thing TweetDelete doesn’t do is removing likes. But when I checked on the web version of Twitter, removing a like is a single click. No confirmation modals or anything like that. So it should be doable from the browser inspector (called ‘developer tools’ in some browsers). But I could be even lazier. I was sure someone had already done that, and I just needed to find a gist or blog post with the code in it. And I did.

Robert Hayes published a post about removing likes on alphr.com (whoever they are). Which is exactly what I needed

setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click();
  }
  window.scrollTo(0, document.body.scrollHeight);
}, 10000);

To use it, navigate to the ‘likes’ tab, then paste the above JS in the browser inspector. The snippet will click on all the icons with attributes data-testid="unlike", then scroll to the bottom of the page, and wait 10 seconds to give the UI time to load the next lot of liked tweets. Then it will click on all the ‘unlikes’ and so on, until you are done. Thanks Robert!

And that was that

All in all simpler than I thought - I got it done without having to get API keys and all that jazz