Delete your own X.com replies, slowly.
A local Node.js + Playwright tool that drives your own logged-in browser. No API tokens, no third-party server, no password automation. Pacing target: ~6 deletes per minute.
Get the source on GitHub Install
What it actually does
v1 walks x.com/<handle>/with_replies in a visible Chromium window you control, identifies your own reply cards, and deletes them one at a time through the same caret menu you would click yourself. The browser profile is yours. Cookies live in a local ./.profile/ directory. Originals, reposts, and likes are deferred — the modules exist and are tested, just not wired into the CLI yet.
How it works (3 steps)
- Log in once.
npm run loginopens Chromium against the X login flow. You sign in by hand. Cookies land in./.profile/. - Dry run.
npm run run:cleaner -- --handle=<you> --dry-run --max=20prints which reply ids would be deleted. No clicks happen. - Real run. Drop
--dry-run. Watch the visible window.Ctrl-Cstops at any point — state is flushed after every action, so resume is the same command again.
Pacing defaults
| Knob | Default |
|---|---|
| Inter-deletion gap | 6–14 s |
| Long break every | 30 deletes |
| Long break length | 60–180 s |
| Hourly cap | 360 |
| Daily cap | 1500 |
| Errors → 30 min pause | 3 |
| Errors → abort | 10 |
When something breaks
X ships UI changes on its own schedule. Selectors are a snapshot of the DOM on 2026-04-27. When a selector goes stale, the runner saves a diagnostic bundle to state/diagnostics/<ts>-<reason>/:
screenshot.png— full-page capture at the moment of failurepage.html— full DOMarticle.html— the targeted tweet cardsnapshot.txt— accessibility treemeta.json— reason, URL, timestamps
Open the bundle, find the selector that broke, update src/selectors.ts and test/fixtures/with-replies.html, re-run tests, then resume.
Install
git clone https://github.com/cocodedk/x-cleaner
cd x-cleaner
npm install
npx playwright install chromium
Requires Node 20+.
Caveats — read these
Grey area of X's terms. Browser automation of your own account for content deletion sits in a grey area. We mirror what Cyd, Redact, XDelete do. Use a real account at your own discretion.
Selectors break without notice. No CAPTCHA solving, no proxy rotation, no headless-stealth tricks. If X challenges you, the run aborts and you handle it as a human.
License & source
Apache-2.0. Source on github.com/cocodedk/x-cleaner. Issues and selector-breakage reports welcome.