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.7.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.7-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xcleaner-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 ad2334a0b3638b5ee887c0d885d0c05299cbc0f033ce199627d6df9a6dd3c17c
MD5 f84f71de6c513ff15cecd1fa3f0085e8
BLAKE2b-256 49ebfbe3ff07aa3a1619010b7107430512048b54198222147ac14e6ec9f8eec9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xcleaner-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3d841fbfafa706c9e7f4690e24acf521bd0ae71925727b31a9fbd1ff69563161
MD5 9f7dca5ebc1de34c546cb221c004e6ff
BLAKE2b-256 b0d9ce5566932a811a52a5301c8578983ccc4017ed3f8267060941024735456f

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