Delete tweets (or just replies or retweets) from your timeline, including tweets beyond the 3,200 tweet limit.
- Open Twitter's Application Management, and create a new Twitter app.
- Set the permissions of your app to Read and Write.
- Set the required environment variables:
TWITTER_CONSUMER_KEY="[your consumer key]"
TWITTER_CONSUMER_SECRET="[your consumer secret]"
TWITTER_ACCESS_TOKEN="[your access token]"
TWITTER_ACCESS_TOKEN_SECRET="[your access token secret]"- Open your account page.
- Click 'Your Twitter archive', and a link to your archive will arrive per email.
- Follow the link in the email to download the archive.
- Unpack the archive, and move
tweets.csvto the same directory as this script.
Install the required dependencies.
pip install -r requirements.txt
For example, delete any tweet from before January 1, 2014:
python deletetweets.py -d 2014-01-01Or delete all retweets:
python deletetweets.py -r retweet