Skip to content

TendieShop/tweetXer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 

Repository files navigation

tweetXer

You can use this script to delete all your Tweets. Even if they don't show up on your profile. But you need your Data Export for it to work. Because this automates the deletion, it may get your account banned. Not a bad outcome.

Video tutorial

Youtube player preview showing a screenrecording: Left half is a firefox with twitter.com open and and open console. Right side is a code editor with bullet points and a person looking at the viewer with animated blue birds flying around their head.

English: youtube.com/watch?v=jB1-z6LbX5w

German: youtube.com/watch?v=HmQ7_ZgVNxg

Usage

  1. Use Firefox or Safari if possible
  2. Log into your Twitter account
  3. Open the browser console (F12)
  4. Paste the whole script into the console and press enter
  5. A light blue bar appears at the top of the window
  6. Use the file picker to select your tweet-headers.js or tweets.js file
  7. Wait for all your Tweets to vanish (about 5-10 Tweets per second)

If the process is interrupted at any time, you can use the advanced options to enter how many Tweets have been deleted in the previous run to not start at zero again.

https://github.com/lucahammer/tweetXer/blob/1f43409f4f5717c41255494e53ccfc8123cf4b66/tweetXer.js#L1-L549

Alternative to copy & paste: userscript

Instead of copy-pasting the script, you can install it as a userscript: greasyfork.org/en/scripts/476062-tweetxer (works with eg. tampermonkey browser addon)

The userscript works on smartphones as well. Android only. 1. Install Firefox Mobile, 2. Install the Tampermonkey addon, 3. install the script from greasyfork. Open X com and the blue bar should show up. You may need to uninstall the X-App before.

How it works

Never use something like this from an untrusted source. The script intercepts requests from your browser to Twitter and replaces the Tweet-IDs with IDs from your tweets.js file. This allows it to access the old Tweets and delete them.

XHR interception inspired by github.com/ttodua/Tamper-Request-Javascript-Tool

Faster deletion inspired by github.com/Lyfhael/DeleteTweets

Bonus: Export your bookmarks

Because bookmarks aren't included in the Twitter data export, there is a button under "Advanced options" to export them.

Bonus: Tweet deletion without data export

If for some reason you can't use your data export or it missed some Tweets, you can use slow mode under "Advanced options". Be warned, it is very slow because it has to load the Tweets on your profile first to delete them and there are various request limits for that.

Bonus: Unfollow everyone

Under "Advanced options" you can automatically unfollow everyone. You may need to rerun with some time in between because of rate limits.

Known issues and solutions

  • X Corp doesn't send me my data export.

Try requesting it through their Privacy Form.

  • Not all Tweets got removed.

Check if the ID of the remaining Tweet is in your data export. The script can only remove what's in the file. There is a option to automatically remove remaining Tweets under "Advanced options" but it is very slow. If there are many Tweets, re-run the script. Maybe request a new export.

  • No Tweets are visible on the profile, but Tweet count shows there are still Tweets left.

In most cases those are Retweets from Tweets from accounts that got deactivated or banned. Sometimes the Tweets reappear once the accounts come back, sometimes they don't. There is nothing you can do.

  • Likes aren't removed.

Only the last few hundred can be be removed. Even by hand. There is nothing you can do other than deleting your whole account. Or reliking Tweets to unlike them afterwards which will probably get your account locked for spamming.

  • Browser crashes

    This happens more often with Chrome and Chrome-based browsers. Especially when removing more than 15 k Tweets. Closing the browser console while it runs seems to reduce the crashes.

  • It worked and you are thankful.

Awesome. Share the script on whatever platform you are using now to give others the option to delete their Tweets. Support me to keep creating things like this: buymeacoffee.com/lucahammer

About

Delete all your Tweets for free

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%