Skip to content

Instantly share code, notes, and snippets.

Last active February 4, 2023 23:51
What would you like to do?
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at
@requirements: Python 2.5+, Tweepy (
@author: Dave Jeffery
import tweepy
def oauth_login(consumer_key, consumer_secret):
"""Authenticate with twitter using OAuth"""
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth_url = auth.get_authorization_url()
verify_code = raw_input("Authenticate at %s and then enter you verification code here > " % auth_url)
return tweepy.API(auth)
def batch_delete(api):
print "You are about to Delete all tweets from the account @%s." % api.verify_credentials().screen_name
print "Does this sound ok? There is no undo! Type yes to carry out this action."
do_delete = raw_input("> ")
if do_delete.lower() == 'yes':
for status in tweepy.Cursor(api.user_timeline).items():
print "Deleted:",
print "Failed to delete:",
if __name__ == "__main__":
print "Authenticated as: %s" %
Copy link

i wrote this up:

hey dude can u help me how can i delete all my tweets? i dont know how can i make a app from twitter.

set the number of days to 0 in my repo. after you got your auth set up just run it and you'll be good (not for likes though, but see my readme for that).

Hi!, I want to delete all my tweets. I do all instructions on your repo and get my auth to set up. But, after running it, my tweets it's still the same / not deleted.
Are there any specific settings when creating the API? Such as Permissions? cause, I only see permission to read and write, not to delete tweets.

Copy link

ihpannu commented Nov 5, 2020

Copy link

Smyja commented Jan 5, 2021

Updated version to use with Python 3

The link isn't working.

Copy link

amass01 commented Feb 5, 2021

Updated version to use with Python 3

The link isn't working.

just copy paste it

Copy link

Copy link

A very simple NodeJS script to wipe all your tweets including step-by-step directions for obtaining all necessary tokens/keys:

Copy link

Copy link

still working ? i need to do this on my tiwtter archive

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