Delete Your Old Tweets With TweetXer

Deleting years of posts one at a time is not a serious plan. TweetXer is an open-source script that reads your Twitter archive and automates the deletion from your logged-in browser session.

This is destructive. Export the archive first, review the script before running it, and assume deleted posts cannot be recovered from the service.

Twitter has since been renamed X, and both its interface and archive format can change. These steps describe the workflow available when this article was written.

Download the archive first

Open Twitter’s data download page, request an archive, and wait for the account notification. Preparation may take a while.

Download and unzip the archive somewhere private. It contains account history you probably do not want in a public folder or repository. TweetXer uses the tweet-headers.js file from that export to identify posts.

Review and run TweetXer

Open the TweetXer repository and read its current instructions and source. Browser-console scripts run with your logged-in account’s permissions, so “open source” is an invitation to inspect the code, not a guarantee that every copied version is safe.

The original workflow was:

  1. Sign in to Twitter in a desktop browser.
  2. Open Developer Tools and select the Console tab.
  3. Paste the current TweetXer script from its repository and run it.
  4. When prompted, choose tweet-headers.js from the archive.
  5. Leave the tab open while the script deletes the posts.

The service may rate-limit repeated deletion requests. If that happens, stop and follow the project’s current advice rather than shortening every delay until the account is locked.

TweetXer has also been distributed as a userscript for managers such as Tampermonkey. That can be more convenient, but it adds another extension with access to pages you visit. Check the permissions and source before installing it.

Verify the result

When the script finishes, reload the profile and check older date ranges rather than looking only at the first screen. Search indexes, embeds, caches, screenshots, and third-party archives may still contain copies even after the original posts disappear.

This method avoids a paid bulk-deletion service, but the cost is that you are responsible for the backup, the script, and any interface change. For a one-off cleanup, I think that is a fair trade—provided you read before you paste.