Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
delete your tweets and un-retweet tweets
// go to https://twitter.com/your-username, and enter the following into the developer console:
for(var i = 1; i < 500; i++){ // just do it a bunch
// Un retweet
document.getElementsByClassName("ProfileTweet-actionButtonUndo")[i].click();
document.getElementsByClassName("js-close")[0].click();
// Delete tweets
document.getElementsByClassName("js-actionDelete")[i].childNodes[1].click();
document.getElementsByClassName("delete-action")[0].click()
}
@micahporter

This comment has been minimized.

Copy link

@micahporter micahporter commented Dec 10, 2015

I'm new to this site, but can you explain to me how to use this code to delete all my tweets? I've authorized several apps but for some reason my account won't allow those apps to do their job (deleting my tweets)... i want to know how to use this code 'cause it seems like it could be my only option at this point... i know how to open up the "developer console" and the "inspect element" on the google chrome site. but when i try to copy this code and paste it, it says "UNCAUGHT REFERENCE ERROR:....". please let me know asap! thank you:)

@SkyroamCleggett

This comment has been minimized.

Copy link

@SkyroamCleggett SkyroamCleggett commented Mar 11, 2018

This script works, but you have to do it a few times because Twitter probably has implemented some sort of limit. Not sure if there would be a way to space out the script so that it's not performing the actions so rapidly.

Twitter server for me. 403 response code per https://developer.twitter.com/en/docs/basics/response-codes

403 Forbidden The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. This code is used when requests are being denied due to update limits . Other reasons for this status being returned are listed alongside the error codes in the table below.
@rmak78

This comment has been minimized.

Copy link

@rmak78 rmak78 commented Aug 27, 2018

// Remove Likes
$(".ProfileTweet-action--unfavorite").click();

@helloromero

This comment has been minimized.

Copy link

@helloromero helloromero commented Sep 30, 2019

This no longer works...

@nabilazzh

This comment has been minimized.

Copy link

@nabilazzh nabilazzh commented Mar 27, 2020

please if u find another code or whatever it is for un-retweet, un-like and delete all of the tweets. tell me, i do be really need it ASAP :""""(

@nabilazzh

This comment has been minimized.

Copy link

@nabilazzh nabilazzh commented Mar 27, 2020

i make this account just for comment on your post, so please help me...

@krrskl

This comment has been minimized.

@FocusWho

This comment has been minimized.

Copy link

@FocusWho FocusWho commented Jun 10, 2020

This doesn't work anymore, I made a new one that works with the current more involved REACT UI:

https://gist.github.com/FocusWho/5a8e74895293eae0071cec612477c72f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.