Skip to content

Automatically delete tweets and remove reposts from your X/Twitter account. This script uses Selenium to automate the process of cleaning up your X/Twitter timeline.

License

Notifications You must be signed in to change notification settings

xzrfax/X-Twitter-Clean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-Twitter-Clean

Automatically delete tweets and remove reposts from your X/Twitter account. This script uses Selenium to automate the process of cleaning up your X/Twitter timeline.

Features

  • Deletes tweets and removes reposts
  • Works with the latest X/Twitter interface
  • Handles rate limiting and dynamic loading
  • Secure password input
  • Automatic scrolling and content detection

Prerequisites

  • Python 3.6 or higher
  • Chrome browser
  • ChromeDriver matching your Chrome version
  • pip (comes with Python on Windows, use pip3 on macOS)

Installation

  1. Clone this repository:
git clone https://github.com/xzrfax/X-Twitter-Clean.git
cd X-Twitter-Clean
  1. Create and activate a virtual environment (recommended):
# Windows:
python -m venv venv
venv\Scripts\activate

# macOS/Linux:
python3 -m venv venv
source venv/bin/activate
  1. Install required packages:
# Windows:
pip install -r requirements.txt

# macOS/Linux:
pip3 install -r requirements.txt
  1. Install ChromeDriver:

Usage

  1. Run the script:
# Windows:
python twitter_delete.py

# macOS/Linux:
python3 twitter_delete.py
  1. Enter your X/Twitter username when prompted
  2. Enter your password (input will be hidden)
  3. Let the script run - it will automatically scroll through your profile and remove tweets/reposts
  4. Press Ctrl+C at any time to stop the script

How It Works

  • The script logs into your X/Twitter account using the provided credentials
  • It scrolls through your profile, looking for tweets and reposts
  • For each tweet found, it clicks the menu and delete buttons
  • For each repost found, it clicks the repost button to undo it
  • The script handles dynamic loading and rate limiting automatically

Safety & Privacy

  • Your password is never stored or logged
  • The script runs in incognito mode
  • No data is collected or transmitted except to X/Twitter
  • All automation is done through official X/Twitter web interfaces

Troubleshooting

  • If the script fails to start, ensure ChromeDriver matches your Chrome version
  • If login fails, check your credentials
  • If the script seems stuck, try restarting it
  • For other issues, check the error messages in the console

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This script is not affiliated with X/Twitter. Use at your own risk. The author is not responsible for any account restrictions or other consequences of using this script.

About

Automatically delete tweets and remove reposts from your X/Twitter account. This script uses Selenium to automate the process of cleaning up your X/Twitter timeline.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages