Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Tweet Clear

Local, preview-first X profile cleanup for an official X data export.

This is a browser-console JavaScript tool. It does not use api.x.com, does not require a developer account, and does not upload the archive. It runs on x.com while you are logged in and sends deletion requests through the authenticated X web session.

Use

  1. Make a fresh backup of the archive. Deletion is permanent.
  2. Open https://x.com in the browser and log into the account you intend to clear.
  3. Open Developer Tools → Console.
  4. Copy the complete contents of tweet-clear.js into the console and press Enter.
  5. Select archive/data/tweets.js from the archive folder.
  6. Review the counts and sample items. Posts, replies, and retweets are selected by default.
  7. Click Review and delete selected items, then type the exact confirmation phrase.
  8. Leave the tab open. If X rate-limits the session, the script waits and retries. You can stop safely; successful IDs are saved locally and skipped on the next run with the same archive.

The archive parser supports the current format:

window.YTD.tweets.part0 = [ ... ]

It also accepts older JSON-like export files containing objects with tweet.id_str or tweet.tweet_id.

Scope and limitations

  • The archive is a snapshot. Posts made after it was downloaded are not included; request a fresh archive and run it again if needed.
  • deleted-tweets.js is not selected because those posts are already deleted.
  • Likes, bookmarks, follows, direct messages, and profile data are outside this script's scope.
  • Retweets are identified from the archive's retweeted flag or the legacy RT @... text prefix. Quote posts remain ordinary posts.
  • X's internal web endpoint and request identifiers can change without notice. A 401/403 stops the run rather than repeatedly retrying.
  • X does not publish a dependable limit for this internal endpoint. The default pacing is approximately 1.8–3 seconds between successful deletion requests, with longer backoff for 420/429 responses.
  • X warns that mass-deletion programs may cause account restrictions. Use this only for your own account and accept that risk.

No credentials or archive contents are sent anywhere except the normal requests to X from the logged-in browser tab. The script stores only completed tweet IDs in that browser's local storage so an interrupted run can resume.

About

Free script to delete all tweets, replies and retweets. Paste the script in Chrome console.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages