A userscript that automatically deletes all posts (tweets, retweets, replies) from your X (Twitter) account directly from your profile, without requiring the official data archive.
Runs fully in the browser using your authenticated session.
⚠️ Irreversible action. Use responsibly.
To stop deletion at any moment: close the browser tab.
- ✅ Deletes all posts from your account
- ✅ No data archive needed
- ✅ Simple popup UI with Start deletion button
- ✅ Progress bar + live counter
- ✅ Handles retweets via the UI
- ✅ Automatic rate-limit handling (429 + reset timers)
- ✅ Detects post count in multiple languages (Hebrew, English, Spanish, German, Italian, Turkish, Russian, etc.)
- ✅ Runs client-side only
- Install a userscript manager: Tampermonkey / Violentmonkey.
- Create a new script and paste the contents of
userscript.user.js. - Enable the script on:
x.comtwitter.com
- Refresh your profile page — a popup will appear.
- Log into X and open your profile.
- A modal window will appear automatically.
- Click Start deletion.
- Keep the tab open until completion.
- The script scrolls, collects visible post IDs, and deletes them via the X API.
- Retweets are unretweeted using the UI button.
- To stop deletion, simply close the tab.
- Closing the tab immediately halts the loop and no more deletion requests are sent.
If you prefer not to install a userscript manager, you can run the script directly:
- Open your profile on X.
- Press
F12to open DevTools. - Go to the Console tab.
- Paste the full contents of
userscript.user.jsinto the console. - Press Enter.
The same popup UI will appear, and you can click Start deletion.
- Scrapes visible posts using selectors like:
a[href*="/status/"]inside[data-testid="tweet"] - Sends authenticated DeleteTweet GraphQL requests using your session cookies:
authorizationct0(CSRF)OAuth2Session
- Respects rate limits and pauses when necessary.
- Removes deleted posts from the DOM to minimize repeats.
- Large profiles (100k+ posts) require long runtimes due to X's infinite scroll.
- X may occasionally return 404/500 errors for old media URLs — harmless.
- If X changes DOM structure, selectors may need updating.
- Retweets require UI interaction since their API differs.
- Refresh the page
- Ensure the script is enabled
- Make sure you're on your profile, not someone else’s
- X’s rate limits vary; the script automatically slows down to stay within safe bounds.
- Close the browser tab
- All operations run locally in your browser.
- No data is uploaded anywhere.
MIT