Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Twitter Delete and Unlike Bot


Tweet deletion is irreversible.

If you accidentally delete tweets you did not intend, that's your own silly fault for running code you got from a stranger on the internet.

This code is provided as is, you are encouraged to review it carefully before running it to ensure it does what you think it will do.

I take no responsibility for erroneously deleted tweets!

My personal Twitter profile uses this bot every day. If you want to see what it looks like when I eat my own dog food, my timeline is here: @JacksonBates. I've tweeted thousands of times, but there is most likely around 100 or fewer tweets in my timeline at any given point.


Designed to be run on a schedule, or simply from the command line.

npm start triggers two bot actions:

  1. Tweets older than 10 days will be deleted;

  2. Liked / Favourited tweets older than 10 days will be unliked / unfaved.

You can 'save' tweets from being deleted by liking your own tweets. Yes, this is a little like smelling your own toots, but it is the price of preserving your wittiest tweets. Once you no longer want to save them, unlike them again and they will be deleted the next time the script runs.


  1. Create your own Twitter App at

  2. Obtain the API keys: API Key, API Secret, Access Token and Access Token Secret

  3. If you are planning on keeping your code on a public repo like GitHub, then store these keys in a .env file and remember to add the file to your .gitignore file. You can also use the .env file to manage your environment variables via the dotenv npm package include in the package.json.

    .env file formatting:

  1. If you are hosting via Heroku, remember to set the variables manually for your app.

  2. To customise for your own Twitter account, change the value exported by the screen_name.js file in the src folder to your screen name. For obvious reasons, you can only delete your own tweets!

  3. Schedule! On a Linux machine, you may want to set up a cronjob. Windows users can use Task Scheduler. Alternatively, you can host this for free on Heroku and have the Heroku Scheduler add-on run it for you remotely.


A bot that deletes and un-favourites tweets that are more than 10 days old. Schedule this to run once a day to become an ephemeral tweep, just like







No releases published


No packages published