How to delete all your tweets for free

Warning: Using tools to automate certain things may be against twitters / x’s terms of use. In the EU I believe we’ve got the right to delete our content. So using this tool could potentially get your account shutdown.

Truth be told I mostly stopped using twitter a couple of years ago. It’s a incredible drain on time and while there are rewards to using it there are also a lot of negatives. I have / had about 50,000 tweets on my account which is kinda insane and I’m not going to delete them one by one. I also don’t like the idea of my content being left .. scraped and used in god knows what ways. (Yeah so I still use facebook … cough cough)

Delete Twitter?

Now while many people have opted to completely nuke / delete their account I didn’t want to go that route (My account links to my mastodon account) so what can you do?

First up I’d probably recommend taking a backup of your data. You never know right? Will any of it make sense? Probably not so much .. you were in a certain place and time when you wrote those tweets so really whether you want to hang on to it all is up to you.

Secondly … we’re going to take a backup of your data anyways, but but but … I don’t want to! Tough we need it for the next part.

While there are probably systems out there that will delete your tweets for you they are generally going to be paid apps (One I tried deleted 2000 tweets for me and then required me to pay for the app). I don’t want to pay to delete my content so we’re going to take a backup of the content. THEN based on that export of our content we run through each of our tweets and delete them based on the tweet ID from the backup file. (But all we really need to do is click click a few times)

Head to https://x.com/settings/account click on Download an archive of your data and you’ll be asked to enter your password.

Here you’ll request your data and it’s probably going to take at least 24 hours for your backup to be made available.

Once it is available go ahead and download it. You’ll have a folder with assets and another with data. In the data folder you’ve got tweet-header.js and that’s the file we’re going to use on the next bit.

A programmer named Luca has made a little script available over on github called tweetXer.js

Click on Raw on the top right of the code and copy all of the code.

Open twitter / x.com and then open up developer tools in your browser (I’m still using chrome … so sue me) .. 3 dotsmore tools .. Developer Tools … or use the keyboard shortcut (command option i on the mac)

Click onto console and paste in the code you’d grabbed

You’ll have a file input box and you should be able to go ahead and select the tweet-header.js file we’d grabbed earlier which is in the data folder.

Tweets should magically start deleting. At around the 15k tweets mark this blew up for me so I had to refresh the browser (your results may vary). Open dev tools again paste in your code and start again but click on advanced options and start at tweet 15k if you managed to delete 15k and repeat the process another few times if needs be.

There we have it your tweets are hopefully gone (though you’ve got a backup if you wish to hang onto that)

Leave a Reply

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