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

Uploaded Python 3

File details

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

File metadata

  • Download URL: xcleaner-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 6f10616ff3b2fc82dcf8d309bb86bd4a66b136395a1fb76bb588d178ff438165
MD5 6e81846baffb903c39451010229085f5
BLAKE2b-256 10a36fe7b05ee7a89bd8b2ee8550ac2d5d433b57a115b803b3a98e2c6f3db8d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xcleaner-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9aab8f2b5b6712fd1ebe8281699deeea300c44c65f72d90acd55bd4c92548e3f
MD5 f4647708ffda84003fa6590aa235b03b
BLAKE2b-256 3077ced9c6117cfabdd984e6de666e0dfeb9ac4945367ef5c522c31e6698e301

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