x-cleanup
Delete all your posts and replies and undo your reposts on X, from your own browser. One script you paste into the console. No install, no API keys, no third-party login. Likes are left alone.
Deletions are permanent. X has no undo. Download your archive first (Settings → Your account → Download an archive) if you want a copy.
How to use it
- Sign in to x.com on a desktop browser.
- Open your profile's Replies tab:
https://x.com/<your-username>/with_replies - Open the console: F12, or Cmd Option J on a Mac, then the Console tab.
- Paste the script and press Enter. If Chrome blocks pasting, type
allow pastingand press Enter first. - Click OK to confirm. Progress prints in the console. Keep the tab open and visible until the summary appears.
To stop at any point:
window.stopXCleanup = true
Why it is safe to run
Runs only on your page
It stops unless it is on x.com, on a profile tab, and that profile matches the signed-in account.
The script calls no server
No API key and nothing sent anywhere. It clicks the same menus you would.
Readable in five minutes
About 400 lines of plain JavaScript. Read it before you run it.