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

Uploaded Python 3

File details

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

File metadata

  • Download URL: xcleaner-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 025aa96030f56796d8a750dfb482e1a62efdbe83fcaf45dbafb21f83bb26bfaf
MD5 cf1f1908b4416b0ef654c4ad2bc89117
BLAKE2b-256 c065576a3396002fcd1bafb312ba352f2d33f63f3259d5bf4ee545d0afd9a02b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xcleaner-0.1.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 296c9f4a8d6edbe599066a7138fc02afe20dea877a665dde11f08e89cbbbc0b5
MD5 d76b7c56845088cac48d4d42922953c4
BLAKE2b-256 72638fba161c2d3f88d6865185b8680c34d872be84e22966a12bb20c514f2fd4

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