Delete your tweets using GitHub Actions

A few years ago I hacked together a bash script that you could use to backup and delete your tweets on a regular basis. For fun, I decided to do something similar using GitHub Actions.

tweet-delete doesn’t create backups, and deletes your tweets on a weekly basis. In addition, since the Twitter API only lets you get a maximum of 200 tweets per request, it won’t work if you have more than 200 tweets1. Many moons ago, I deleted all my tweets and started from scratch and since I don’t post more than 200 tweets in a week it works for me.

To use tweet-delete, clone the tweet-delete repo and edit tweet-delete.sh, replacing the twitter_user variable with your own Twitter user name.

Next, create an app on the Twitter Developer portal and add the following secrets to the GitHub repo using the names:

  • twitter_consumer_api_key
  • twitter_consumer_api_secret_key
  • twitter_access_token
  • twitter_access_token_secret

After committing your changes, a git push to the master branch will kick off the workflow2 and it’ll run automagically every Sunday at 23:453.


  1. I suspect it’ll delete the 200 most recent. 
  2. Delete the “Run when pushed to master” event from tweet-delete.ymlto run only on a schedule. 
  3. Configurable in the tweet-delete.yml file
Tag: project