Skip to content

Instantly share code, notes, and snippets.

@larjudge
Forked from nerdcha/delete_tweets.sh
Created April 2, 2020 02:33
Show Gist options
  • Select an option

  • Save larjudge/4ba0f830f3a4f3b80494e6396c7944d2 to your computer and use it in GitHub Desktop.

Select an option

Save larjudge/4ba0f830f3a4f3b80494e6396c7944d2 to your computer and use it in GitHub Desktop.
Bash oneliner to delete tweets
#!/bin/bash
# Context: https://jamiehall.cc/2020/03/10/delete-all-your-tweets-with-one-line-of-bash/
# https://news.ycombinator.com/item?id=22689746
twurl "/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200&max_id=$(twurl '/1.1/statuses/user_timeline.json?screen_name=YOUR_TWITTER_HANDLE&count=200&include_rts=1' | jq -r '.[9]|.id_str')&include_rts=1" | jq -r '.[]|.id_str' | parallel -j 10 -a - twurl -X POST /1.1/statuses/destroy/{1}.json > /dev/null
@larjudge
Copy link
Author

larjudge commented Apr 2, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment