In order to delete all your tweets, you need to get a backup of your data first. Twitter allows you to easily export all of your past tweets into a .js file which you need for the next steps.
Navigate to the “Your Twitter Data” section on Twitter's settings page. You'll receive a .zip file by mail from Twitter.
Copy the tweets.js
(from the data directory) into the folder of this script.
Rename the file from tweet.js to tweet.json. Open it using your favorite editor and remove the string window.YTD.tweet.part0 =
. Save the file.
Go to the Twitter Developer page and Create an app. If you're not familiar with the concept of creating a developer account on Twitter or how to create an app, please follow the Twitter Docs.
Copy the Consumer Key, Consumer Secret, Access Token and Access Token Secret Key. Paste it into ConsumerKey
, ConsumerSecret
, AccessToken
and AccessTokenSecret
in the main.go
file.
In the main.go
file, set the values for DateFrom
and DateFrom
Open your terminal, navigate to the folder of this script and build the script:
go build main.go
Afterwards, run the script (like this on MacOS):
./tweet-del
The project uses the following libraries:
The project is licensed under the MIT license.