Nothing is forever. Except the Internet.
Automatically delete tweets, retweets, and favorites.
Heavily based on https://github.com/victoriadrake/ephemeral.
How it works
Depending on the schedule you set, this bot will:
- Read config file
- Get your timeline
- Delete all tweets older than
- Unfavorite tweets older than
- (Optional) Ping healthcheck URLs
You can set
DRY_RUN=true to print all actions it will take instead of actually deleting tweets.
The tool does not take into account Twitter rate limits, but it does sleep for a few seconds between each Twitter API call.
Copy and create a
template.env. Look at comments for values (then delete the comments).
Build and Run
ENV_FILE_PATH to the file that contains the env vars.
$ ENV_FILE_PATH=sandbox.env go run main.go
ENV_FILE_PATH to the file that contains the env vars. Set
GOOS to your target platform.
$ GOOS=linux go build -ldflags="-d -s -w" -o fleets main.go && chmod +x fleets $ ENV_FILE_PATH=sandbox.env ./fleets
You can use cron to run the script. Example to run it every day at 4pm:
DATEVAR=date +%Y-%m-%d 0 16 * * * ENV_FILE_PATH=/home/prod.env /home/fleets >> /home/cron-$($DATEVAR).log 2>&1