Skip to main content

Delete all posts from your X (formerly Twitter) account.

Project description

X Cleaner

Delete all posts from your X (formerly Twitter) account using a simple Python CLI.

Project Structure

x-delete-posts/
├── xcleaner/
│   ├── __init__.py
│   ├── authenticate_x.py
│   ├── delete_all_x_posts.py
│   └── main.py
├── tests/
│   └── test_*.py
├── requirements.txt
├── setup.py
└── README.md

Requirements

  • Python 3.11 or newer
  • An X (Twitter) Developer account and API keys

Installation

Install from PyPI (recommended):

pip install xcleaner

Or install locally for development:

pip install .

Usage

After installing, you can use the CLI tool:

xcleaner --api-key <your_key> --api-secret-key <your_secret> --access-token <your_token> --access-token-secret <your_token_secret>

Or set your credentials as environment variables and simply run:

xcleaner

Environment variables:

# On Windows (PowerShell)
$env:X_API_KEY="your_api_key"
$env:X_API_SECRET_KEY="your_api_secret_key"
$env:X_ACCESS_TOKEN="your_access_token"
$env:X_ACCESS_TOKEN_SECRET="your_access_token_secret"
xcleaner

# On macOS/Linux
export X_API_KEY="your_api_key"
export X_API_SECRET_KEY="your_api_secret_key"
export X_ACCESS_TOKEN="your_access_token"
export X_ACCESS_TOKEN_SECRET="your_access_token_secret"
xcleaner

You can also delete posts from a JSON archive:

xcleaner --json path/to/posts.json [--api-key ...]

Warning: This script will permanently delete all posts from your account. Use with caution!

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

xcleaner-0.1.5.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

xcleaner-0.1.5-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file xcleaner-0.1.5.tar.gz.

File metadata

  • Download URL: xcleaner-0.1.5.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for xcleaner-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d759962a7ccd580f542cbcdabb6786ccef398e03a0b8b4349cf6f3141bafcc3e
MD5 32e2e26e0cd300e1dadb885ce2417be0
BLAKE2b-256 11a8f1f1ab5dc06fb6fa8a056c5ab00f838bc777c110e993271bf84bfd80fe6c

See more details on using hashes here.

File details

Details for the file xcleaner-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: xcleaner-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for xcleaner-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 535bd188c625c5f0e00c7667e37f77059e622d0df6f0e9c84234f9434de14c54
MD5 212e9baf9f5960d8e4414cbf7d707b10
BLAKE2b-256 7e218f5a3ad58c05ede5bbd1b11ba7af9af4f12f477f62210a612ab941820c4b

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