Skip to content
A program that delete tweets
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

ephemeral: delete tweets

ephemeral is a program that deletes tweets. It is a modified version of Vicky Lai's program which was written to run on AWS Lambda. See her blog post or Github code.

You can use ephemeral to automatically delete all tweets from your timeline that are older than a certain number of hours that you can choose. For instance, you can ensure that your tweets are deleted after one week (168h), or one day (24h).

You can also set a date to not delete prior to, which I named the twepoch. This is used in case you want to keep early tweets around.

Twitter API

This program uses the Go client library Anaconda to access the Twitter API. You will need to create a new Twitter application and generate API keys.

Environment Variables

The program assumes the following environment variables are set:


MAX_TWEET_AGE expects a value of hours, such as: MAX_TWEET_AGE=72h

TWEPOCH expects a date value in YYYY-MM-DD format


  1. See releases for binary downloads for Linux and Raspberry Pi.

  2. Create file, see

  3. Test run

$ source
$ ephemeral --test
  1. Remove --test flag when you're ready to delete away


I run this program using cron on a schedule time running on a Raspberry Pi. Here is the cron entry which shows soucing prior to running.

0 8 * * * . path/to/dir/; path/to/dir/ephemeral


The program is a standard golang program, so the build process is quite straight-forward.

$ git clone
$ cd ephemeral
$ go get
$ go build
Run on a Raspberry Pi

The great thing about golang is its ability to target multiple architectures. You can do a cross-compile build for Raspberry Pi using:

env GOOS=linux GOARCH=arm GOARM=5 go build


This code is modified from Vicky Lai, who modified her code from Adam Drake, both of which released under the MIT license, so let's keep that license train going.

You can’t perform that action at this time.