Skip to content
This repository has been archived by the owner on Apr 15, 2023. It is now read-only.

skibish/twitter-cleaner

Repository files navigation

Twitter Cleaner

Test Release Go Report Card

Twitter rolls out new API access tiers which means that migration to v2 is needed. Free tier doesn't offer all the capabilities needed for twitter-cleaner to function properly.

Basic tier has all the needed APIs but it starts at $100/month which is ridiculous and I'm not interested to pay so much to clean my feed. This is the reason why this repo is archived.

Thanks everyone who used this tool!

Clean your Twitter.

Once in 24 hours all tweets that are older than half a year (by default) will be deleted, un-retweeted and un-favorited from your feed.

Motivation

I observed that tweets liveability is a few days maximum. Why then I need to store them all in my timeline? For me Twitter is a place to interact with others and not to use it as a diary for archeologists.

If you would like to do regular cleanups too, this tool is for you.

Install

Download binary from releases page.

If you have Go:

go get github.com/skibish/twitter-cleaner

Example

$ ./twitter-retention \
  -access-token aaa \
  -access-token-secret ttt \
  -consumer-key kkk \
  -consumer-secret xxx
2021/04/25 13:19:53 successfully started
2021/04/25 13:20:52 scanned through 44 timeline tweets
2021/04/25 13:20:52 DELETING    XXXXXXXXXXXXXX240
2021/04/25 13:20:52 UNRETWEETING        XXXXXXXXXXXXXX624
2021/04/25 13:20:53 scanned through 0 timeline tweets
2021/04/25 13:20:53 scanned through 199 favorite tweets
2021/04/25 13:20:54 scanned through 105 favorite tweets
2021/04/25 13:20:54 UNFAVORITING        XXXXXXXXXXXXXX416
2021/04/25 13:20:54 UNFAVORITING        XXXXXXXXXXXXXX183
2021/04/25 13:20:54 UNFAVORITING        XXXXXXXXXXXXXX100
2021/04/25 13:20:54 UNFAVORITING        XXXXXXXXXXXXXX225
2021/04/25 13:20:55 UNFAVORITING        XXXXXXXXXXXXXX508
2021/04/25 13:20:55 UNFAVORITING        XXXXXXXXXXXXXX317
^C
2021/04/25 13:21:20 shutdown

Usage

./twitter-cleaner:
  -access-token string
        Access token
  -access-token-secret string
        Access token secret
  -check-interval duration
        Cleanup interval (default 24h0m0s)
  -consumer-key string
        Consumer key
  -consumer-secret string
        Consumer secret
  -dry-run
        Check that something can be deleted, no real deletion is made
  -tweet-age duration
        Tweets older than this duration will be deleted (default 4380h0m0s)
  -v    Show version

You can find out here how to create all needed tokens.

Development

go get