Delete tweets from your timeline.
Clone or download
koenrh Merge pull request #10 from koenrh/update-readme
Update download tweet archive instructions
Latest commit 0fad8e0 Aug 29, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Apr 11, 2014
LICENSE Create LICENSE Apr 28, 2018 Clarified instructions in README. Aug 26, 2018 Updated for Python2 & Python3 support Aug 18, 2018
requirements.txt Updated for Python2 & Python3 support Aug 18, 2018
tweets.csv Initial commit Apr 11, 2014

Delete tweets

Delete tweets (or just replies or retweets) from your timeline, including tweets beyond the 3,200 tweet limit.


Configure API access

  1. Open Twitter's Application Management, and create a new Twitter app.
  2. Set the permissions of your app to Read and Write.
  3. 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]"

Get your tweet archive

  1. Open your Twitter account page.
  2. Scroll to the bottom of the page, click 'Request your archive' (not 'Your Twitter data' in the left sidebar!), and wait for the email to arrive.
  3. Follow the link in the email to download your Tweet archive.
  4. Unpack the archive, and move tweets.csv to 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 -d 2014-01-01

Or delete all retweets:

python -r retweet