This util deletes your historical tweets from a downloaded archive file, unfavorites tweets from your public profile.
No guarantee, no support, use it at your own risk.
- Apply to become a Twitter developer first.
Once your Twitter developer account application is approved, You can create a new app and get its Consumer API keys and generate Access token. These keys are used to configure tweet.sh. - Obtain archived tweets by requesting to download your Twitter data.
You can extracttweet.jsfile from the downloaded .zip file. - Download
tweet.shfrom the forked repo.
Configure it following its README.tweet.shrequirescurl,jq,nkf,openssl. - Download
delete-tweets.shandunfav-tweets.shfrom this gist.
chmod +x delete-tweets.sh unfav-tweets.shis recommended. - Install GNU date by running
brew install coreutilsif you decide to run this util on macOS.
Run command in your terminal:
delete-tweets.sh /path/to/tweet.js
This will delete tweets saved in tweet.js.
unfav-tweets.sh
This will unfavorite tweets. It doesn't require the archived file tweet.js.
Whenever you quit the task, or it crashes accidentally, run again and it should resume the task from last working entry.
- Change variable
KEEP_DAYSto 365 in the scripts, if you want to keep tweets posted within recent one year. - Delete the file declared by
LAST_TWEET_FILE, if you want to start over.
tips:
看到类似 [1.23%] Unretweeting tweet NNNNNN posted on mm/dd/yy... parse error: Invalid numeric literal at line 1, column 19 错误的网友可以酌情把 TWEET_UTIL="tweet.sh" 改成 TWEET_UTIL="./tweet.sh"