Skip to main content

Bulk-delete your Threads posts and replies. Free, open-source, runs locally.

Project description

threads-cleaner

Bulk-delete your Threads posts and replies via browser automation.
No API keys, no developer account, no rate limits.

Desktop web status: Meta broke the threads.com desktop web UI — the More (⋮) menu doesn't open.
This tool works around it by using a mobile viewport. The browser opens phone-sized, which serves the working mobile web version.

Installation

pip install threads-cleaner
# or
uv add threads-cleaner

Then install the Chromium browser:

threads-cleaner install-browser

Quick start

# 1. Log in (opens a phone-sized browser — go to threads.net, sign in, go to your profile)
threads-cleaner browser-login

# 2. Delete all posts
threads-cleaner browser-delete

# 3. Watch what happens
threads-cleaner browser-delete --headed --max 5

Usage

Command Description
install-browser Download the Chromium browser required by Playwright
browser-login Opens a headed browser — log into Threads, session saved automatically
browser-delete Deletes posts by clicking the Threads mobile web UI
--include-replies Also delete your replies
--max N, -m N Stop after N deletions (0 = unlimited)
--dry-run Open browser, navigate to profile, no destructive clicks
--headed Show the browser window (for debugging)
--yes, -y Skip the confirmation prompt (for scripting)

Examples

# Delete up to 10 posts, show browser
threads-cleaner browser-delete --headed --max 10

# Delete everything including replies, no prompts
threads-cleaner browser-delete --include-replies --yes

# Preview what the tool would do
threads-cleaner browser-delete --dry-run --headed

# Delete 50 replies only
threads-cleaner browser-delete --include-replies --max 50

How it works

  1. browser-login opens a Chromium window in mobile mode (390×844).
    You sign into threads.net — session cookies are saved to ~/.config/threads-cleaner/session.json.

  2. browser-delete loads those cookies, navigates to your profile, and for each post:

    • Clicks the More (⋮) button via Playwright's native mouse click
    • Clicks Delete in the mobile bottom-sheet menu
    • Clicks Delete in the confirmation dialog (or detects auto-deletion if no dialog appears)
    • Marks each item as "tried" immediately to prevent loops
  3. With --include-replies, it also navigates to @{username}/replies/ and repeats.

Each UI interaction takes ~4-5 seconds. The tool scrolls automatically and can delete hundreds of items per session.

Safety

  • --dry-run opens the browser but never clicks anything destructive.
  • --max N stops after N successful deletes.
  • "Something went wrong" toasts are detected and counted as failures (never falsely reported as deleted).
  • Session cookies expire — re-run browser-login if you see a login error.
  • Every "More" button is tried at most once — no infinite retry loops.

Requirements

  • Python 3.11+
  • Chromium (installed via threads-cleaner install-browser)

Why not use an API?

Approach Result
Meta Threads Graph API Requires approved FB Developer account (author's was suspended)
Instagram REST API (text_feed, media/delete) Returns 404 or kills the session server-side
Threads GraphQL endpoint (threads.com/api/graphql) Same-origin fetch fails from extension context
Browser UI automation ← you are here Works. Clicks the real UI like a human.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

threads_cleaner-0.2.39.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

threads_cleaner-0.2.39-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file threads_cleaner-0.2.39.tar.gz.

File metadata

  • Download URL: threads_cleaner-0.2.39.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for threads_cleaner-0.2.39.tar.gz
Algorithm Hash digest
SHA256 18cbfac77317c1d40614ecdd1126e44f4cfc30286a2caa27ed24f75dda6ca860
MD5 b06ac790e277f488367c691e91bc3486
BLAKE2b-256 1de785b10d6788e61b81d7a2c2648b3320e6906a472a4c3c6942c45de0a9837c

See more details on using hashes here.

File details

Details for the file threads_cleaner-0.2.39-py3-none-any.whl.

File metadata

File hashes

Hashes for threads_cleaner-0.2.39-py3-none-any.whl
Algorithm Hash digest
SHA256 e10cb533ab8c18e90234a405e3e41ec82d30fcb4b3c8694cadf79215f39aadd3
MD5 7d5c127e28ada3613e1dfd239c4df5ac
BLAKE2b-256 b0b0cd9b33e98990f95e01f57d1e8725ef30b1edd1053381075e0866e4d0452d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page