How to delete all your Tweets for free (tutorial)
HTML-код
- Опубликовано: 3 авг 2024
- Guide to delete all your Tweets
1. Export your Twitter data archive from / download_your_data (takes 1-2 days; unzip it after downloading)
2. Copy script from gist.github.com/lucahammer/a4... (or bit.ly/tweetxer)
3. Open browser console (F12) on twitter.com
4. Paste script and hit enter
5. Select tweet-headers.js
6. Wait until all Tweets are gone
Alternative as a userscript: greasyfork.org/en/scripts/476... (works with eg. tampermonkey browser extension)
www.buymeacoffee.com/lucahammer - Хобби
And if you want to save some tweets from deletion, just copy the numbers at the end of the keep tweet, its a bunch of numbers, open up the js file in notepad and search, delete the section that has the tweet, and it will stay. I have left a few memorable tweets as well as one that points to my other socials. Best of luck to everyone.
Is there any tutorial showing how to do this ? also how do I know what the full section is ?
@@BSTComps
example
...},
{
....
},
just delete {
....
},
where ... is the tweet
sorry for my english xd
Not working
help whit this, please!
I genuinely appreciate this video more than you believe, and a huge thanks to the dev too. This saved me SO much headache
didnt you get ant errors
nope@@JamaaYangu-md6ko
Worked like a charm. Thanks, Luca!
It worked perfectly, please keep this updated.
thank you a lot! I have been trying to find a way to delete all without paying for applications which they want access to your account. you are the KING
VAYA MARAVILLA !! no contaba con que funcionase, y al principio me daba error pero solo he tenido que escribir "allow pasting" y me ha dejado pegar el texto. Mil gracias por el aporte ! PD: me hubiese gustado la opción de "filtrar tweets" para que no se eliminen los que yo quiero, no he sabido dar con ello.
Thanks Luca, it worked very well, it first showed an error, then I typed allow pasting then it worked perfectly.
Thanks friend, I had to wait 24 hours for Twitter to give me the data, but it was worth it haha
Great video worked a charm! Thank you Luca!
🥳🥳🥳 thxs a lot Luca!! Work!!!. 8500 post deleted in 15 min.
Thanks Luca! Works perfectly.
Thank you so much for this. You just earned a new sub
Thank you very much for the tutorial!
Muchísimas gracias por este gran aporte, me funcionó muy bien en una mini portátil marca Dell con Windows 7 Proffesional de 32 bits y, en general, no hubo ningún inconveniente.👌💻🤜🤛
El único problema fue que, cuando ya iba por más de la mitad de tweets borrados, la página de Twitter dejó de cargarse y se cayó, y me tocó empezar nuevamente pero ya me faltaban por borrar 528 tweets solamente. Al final, me quedó un residual en mi perfil de nada más 62 Tweets debajo de mi nombre, pues al parecer los ID de esos no estaban dentro del archivo; sin embargo, al buscarlos en el muro tampoco me salen, parece que quedaron ocultos.
Un millón de gracias nuevamente ¡¡SALUDOS desde Cartagena-Colombia🇨🇴!! 🤙
You're so wonderful; thank you so much man!
This worked, thank you!
Thanks Dude, Helped A Lot
Thanks mate! I can confirm that it still works! I only had 1882 tweets since Sep 2010... I guess I exercised a lot of self-restraint compared to others haha! I gave out 17,542 Likes though - that'll take a while to delete...
Yes, this is amazing! It worked. Very simple and does what is needs to do. Thank you!
Works perfectly! Thanks!!!
it worked for me tysm!🖤
Thanks, most helpful.
Thank you Queen
this worked liked a charm
thanks Luca. it works very well
worked perfctly for me, thanks for video
thanks a lot man
THANK YOU SO MUCH!!!!
Thank you. works perfectly fine. just 1 question, if we delete the tweets and then close the browser, the code wont have anymore access to our twitter, right? it's just only once access when we run the code. that's it?
That's correct. If you paste the code to the console, it is gone after closing the tab/browser. If you installed the userscript, the code is loaded each time until you deactivate the userscript or remove it.
@@LucaHammerTube thanks
no issues, thanks goat!
Thank you for this
Before watching the video I had already downloaded the file, and it had almost the same tweets as you, about 11,300 (since 2012). Before proceeding, I deleted about a dozen tweets, from the Tweets-js file I had set, as pointed out by some colleagues in the comments. That's why I uploaded that file and not tweet-headers.js where I didn't have them deleted. It worked fine and in several minutes it deleted all the 11,270 tweets I had. Then I have entered and I have seen that it has saved that dozen of tweets (thread) that I had fixed, but I can not find the first tweet I made, which was a simple phrase, and that I have also removed from the file to save it. Anyway. All correct, thank you.
Can access the missing Tweet manually? If you have a copy of the file, you should be able to get the ID. Then you can visit twitter.com/t/status/ID_OF_THE_TWEET.
@@LucaHammerTube In my profile there is only that thread with 11 tweets in a row that I deleted from the tweets-js file to save them. My first tweet (which I also deleted from the archive) does not appear in my profile, but I have the ID of the archive I saved 195619244581457921. If I visit your link it tells me that page does not exist. If I search in X for the exact phrase from my first tweet (Aquest es el meu primer tweet. Quasi res!!) it does appear. But not in my profile. The phrase is in my language, Catalan. thanks
@@LucaHammerTube thanks.
You are a king :)
Hi @Luca, thanks again for your code. It is possible to remove followers and following too?
I tried with the files following and followers but is not possible. Is there a way to do it?
Thanks
TYVM brother.. deleting now :)
thank u so much it worked
Is there a script that follows all the accounts someone else follows? I made a new twitter account and I want to follow all the pages I followed (over 3k)
thanks a lot you are a heavenly genius !!
Many thanks. Brilliant. It seems to have worked.
Is there a way to also remove 'likes' ?
Thanks again and best wishes
When you run the script and choose the likes.js file, it will try to delete those. But from the reports I got back, it only works for the last few thousands.
Hi, I want to thank you for sharing this amzing script, this works very well and very fast.
And, do you know if there's any way to remove likes/reaction faster?
It works with the likes file as well, but X is unreliable with actually removing them.
when i enter the script i get an uncaught type error for createuploadform, init, and . im using firefox and not sure what i should do
nevermind i just used tampermonkey instead, thanks for this script btw
Have you tried the newest version of the script? github.com/lucahammer/tweetXer/blob/main/tweetXer.js
There was an issue with the part that tried to make it look slightly nicer. I removed it since then.
This one worked perfectly, you are the best@@LucaHammerTube
I've been clicking "download archive" since yesterday, but it just sends me to a page that says "This page isn't working." Very stumped.
Subscribed ✅
From comments it seems to work. I gave you a follow for that. I will try later
tried, gave me an error, please help
VM378:180 Uncaught TypeError: Cannot read properties of undefined (reading 'getAttribute')
at Object.createUploadForm (:180:58)
at Object.init (:40:14)
at :401:11
createUploadForm @ VM378:180
init @ VM378:40
(anonymous) @ VM378:401
Did it work
Is having an archive of my data a crucial step or can I just skip to number two instead? I don't really care about the data, I just want a fresh, clean slate with the same account.
The archive is crucial because it contains the IDs of all your Tweets. The IDs are needed to send the deletion commands.
Thanks, u explain it very well.
Saludos.
Hello, Luca. If I have 10,000 tweets and I want to delete only the 1,000 oldest tweets, can I simply select the advanced options and input 9,000 in the "Tweets to skip"? Will that work?
Thank you.
No. Skipping is done on the reversed list. Entering 9000 would keep the oldest 9000 and remove the newest 1000. To make it work like you want it, you need to remove the line "TweetsXer.tIds.reverse()" (first one is the important one).
But keep in mind that the script doesn't sort the IDs. If they are in the wrong order in the file, it will skip the wrong ones. The safest option is to delete the Tweets you want to keep from the file before selecting it.
@@LucaHammerTube Oke, thanks. I’ll try it.
thank you king
I have retweets from an account that blocked me, is there a script that’d solve that?
Thanks man
Thanks
thanks man! it's a pity it does not delete the likes too but good job :)
It does. At least it tries, when you choose the likes.js as input. X/Twitter responds with success codes, but most favs aren't removed. Only the newest ones.
I cant get the blue box to appear in Firefox using the second method even though the extension (TweetXer) is toggled on. Could it be an issue with the latest update for Firefox?
Do you have the latest version of the script (0.5)?
thanks a lot
u awesome! thank you!
Is this working?
My problem is downloading the archive zip file. The downloading time takes hours too long. Is that normal?
Depends on the size and your internet connection. It includes all media and can be quite big. If your connection is normally fast, it's possible that the issue is on Twitters side.
Luca, can you help me? I have a question: The code was running perfectly and I could see the tweets being deleted as I refreshed the page. But then I lost my internet connection and I had to start again, but now the number of tweets is no longer updating (continues to show the same number) even with the code running perfectly again. What can be?
When I delete a tweet manually, the number updates, but with the code running, there is no change :(. I think something went wrong for me
The script doesn't know about the Tweets that have already been deleted and tries to delete them again. As a result it will take some time until you see changes again.
You can tell it to skip a certain amount of Tweets by clicking on "Advanced options" before selecting the file. There is a field to enter how many Tweets should be skipped.
@@LucaHammerTube Luca, that makes perfect sense. The code deleted approximately 30k tweets. I put the code to run again and I'll come back later to tell if it worked! Thank you for you help.
@@LucaHammerTube It worked perfectly. The code deleted all 100k tweets from my account. Thank you for making this code and also for answering our questions! God bless. Cheers from Brazil. 🇧🇷❤️
I am trying to paste the code in my console browser but it says type allow pasting and when i am typing allow pasting i still am not able to paste. Showing the same warning.
What should i do
@mariav.carvalho4230 wrote that typing a space at the end helps.
it worked fine for 1.5k tweets, after it some error happened and it stopped deleting. Now I'm trying to delete the remaining by repeating process but nothing is happen, it ain't deleting even though showing that tweets are getting deleted. Now what is the solution mate
Before selecting the tweet-headers.js file, click on "Advanced options" and enter 1500, then select the file. That will skip the first 1500 Tweets and the file which you already removed. If you don't do that, it will try to delete them again which takes time.
Hey, i wanna keep few tweets. I saw that we have to go In the tweets. js file but how to know where a tweet starts and where it ends?
In the tweets.js file all Tweets start and end with curly brackets: { } . They are seperated with commas , .
Either remove them including the curly brackets and one comma or just remove the ID of the Tweet (replace with 0000 or something).
The script runs perfectly, but I got disconnected by the server and could not find the number of deleted tweets, because the console turned blank. Any tips?
You can calculate the Tweets by the difference between the Tweet count on your profile and the amount of Tweets in your archive. Before selecting the file, you can click on "Advanced Options" right of the file selection button and then enter the number of Tweets that should be skipped to proceed with the deletion without resending delete-requests for already deleted Tweets.
@@LucaHammerTube Thanks! Managed to delete it all.
Thank you. 2000 tweets were deleted but there appear to be 130 more. It does not appear on my homepage, what is the reason?
Those are most likely Retweets of Tweets that are currently not available. For example because the account of the original Tweet is deactivated. If the accounts get reactivated the Retweets will reappear on the profile. I am not aware of a solution for that.
Is there a way to only delete retweets?
thank you
hey @Luca i have a proble, deleting my tweets with your method went bad and it led to me having a error 131 and i cant change my profile anymore do you know how to fix it please
131 is an unknown internal error. I don't know a solution for that, some people report that it goes away on it's own after 24 hours, but they are still limited to one change to the profile per day. Another reason could be the display name you try to set. Some of them are restricted now. Try something longer and not related to a brand or celebrity.
@@LucaHammerTube thank you indeed it went away after some time :)
When I put my tweets json in the tweetxer, it says "Deleting 0 Tweets" and nothing has happened for a while?
What's the full filename of the file that you select?
@@LucaHammerTube tweet-headers.js and then I tried tweets.js
@@LucaHammerTube tweet-headers and tweets with js at the end of them.
ive deleted all my tweets but there are 500 tweets that i cant delete because its probably retweets from deleted tweets... even if i repeat the process. What do you advice to reach to 0 tweets completely ?
I have been having the same problem for almost over a year with posts and also likes
As far as I know, there is no way to fix that.
In newer Chrome versions it'll be show an error.
To avoid it type "allow pasting" first. Then paste the code.
(According to the source, this "allow pasting" is a one-time pass to paste a code.)
Nhi hora hai delete
I got a question, if i run this will it delete all my older tweets that i cant find
It will send delete commands for all Tweets that are in your exported data file. No matter if they are visible or not. But some Tweets aren't just invisible, but unreachable.
I live in America and I'm worried about getting my account suspended from doing this. Has anyone located in America tried this?
How can I reverse the process? That is, upload the deleted tweets again from my archive. Thank you!
I am not aware of a tool that does that. If you convert the javascript object to CSV you could use one of the sheduled posting tools to post them again. I do not recommend doing that as it is spammy.
If you want to import Tweets to mastodon, you have to run your own instance and use something like github.com/KevinPayravi/twitter-archive-to-mastodon
I did this and it worked and delayed over 5000 tweets until my internet got interrupted and since then I've been seeing errors on the console and it doesn't delete anymore. Any idea of what I should do?
Click on "Advanced options" before selecting the file with the Tweets and enter 5000 to skip the ones that have been deleted. Then select the tweet-headers.js file.
Thank you I deleted all my tweets and it worked like a charm )thank you!!!). Then I did the liked tweet and it seemed to work but left me with lot of “phantom liked tweets“ they are in my liked tweet page but without red ❤ . Not sure why and how to get rid of them now. It shows 22k liked tweets still
Sadly the uhnfaving of Tweets doesn't work reliably. Only the most recent few thousands get removed. The servers reply with a success message, but the favs aren't removed.
The only way I found yet, is to re-fav before unfaving, but that spams the tweet authors and therefore I won't automate it.
@@LucaHammerTube I found a way! I've deactivated my Account for like 5 minutes and reactivated it and it cleared all the ghost liked tweet
oh no they seem to be back...
This seems to work! I have another account which I want to keep the replies of, is it possible or do I sound funny? Like just delete the Tweets/RTs etc but not the replies of tweets Ive given for people?
You would have to remove the replies from the tweets.js file first. If you are fine with using a command line, you could try jq (jqlang.github.io/jq/). Else there are some browser tools to transform json, but it may not be very performant or not work at all depending on how many posts you have.
You would copy all Tweets from the tweets.js file with the brackets [], but without "window.YTD.tweets.part0 = ".
Paste them to json-live-editor.netlify.app/
Change the filter code to "const outputData = inputData.filter(item => !item.tweet.full_text.startsWith('@')); outputData;", which says that you want to want all Tweets that don't start with an "@".
Press "Generate".
Check if the replies aren't in the text anymore.
Copy the output from the are on the right back into the tweets.js file (or a new one). Has to start with "window.YTD.tweets.part0 = ".
Then use that file to run tweetXer.
@@LucaHammerTube How do I delete any tweet from the tweets.js file ? It opens in VS code. I want to keep my pinned tweet thread. Or keeping media tweets would work too.
@@Carbocation-du7ih After opening it with VS Code, search for text or ID of the Tweet you want to keep and delete it including the curvy brackets around it. Most important is that the ID of the Tweet isn't in the file anymore.
Hello it is possible to delete tweet but with no like only ?
Because i want to clear only my tweet under 5 likes for example
You would have to edit the tweets.js file first. I tried to explain the process here: ruclips.net/video/jB1-z6LbX5w/видео.html&lc=Ugw-VruqU7N7nwxHjph4AaABAg.9xCh4RmVkLj9xjkp2bQ3lD
For likes it would probably be something like "item.tweet.entities.favorite_count > 4".
what file did i choose if i want to delete fav or retweets only?
For favs you choose the likes.js file, but it only works for the most recent ones.
For Retweets you would have to edit the tweets.js file and remove all non-Retweets.
I can not find "more tool option" :((
Should I browse the website on desktop? I used my mobile phone
Yes, the script only works with a desktop browser.
@@LucaHammerTube thank you so much
i have a problem, when i pasting a code in my console browser this send me an error that cannot copy a code, how i fixing this error?
Type (don't copy) this command: allow pasting
Then hit enter. After that you should be able to paste the copied code.
@@KaarisonFord That happened to me. Press the space button at the end of the code and then press enter
it took almost two days for them to send my file and it only came as a one-page pdf. is it normal?
No. It should be a zip file containing multiple files.
it didnt work for me, it says "has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
Because they changed the domain from twitter.com to x.com the script failed. marlalein updated the script to make it work again. github.com/lucahammer/tweetXer/pull/9
@@LucaHammerTube oh really? Thank you so much ❤️
@@LucaHammerTube the code did crash again, but it was just one url that had twitter stil and i changed it, thank you so much ❤❤❤❤
Hey i did first time it worked and I left my PC on sleep, its stopped and second time when I started , its not happening any clue?
Reload the website, paste the code, click on "Advanced options", enter the amount of posts it got the first time, select the tweet-headers.js file and keep it awake until it's done.
I got ratelimited when i tried to delete likes, this happened after deleting retweet post. Any advise sir?
Sorry, I can't help with that.
hey, is there a way I could delete my own personal tweets but not retweets? :p
edit: another question I have is does this deletes my bookmarks as well?
Bookmarks are not affected.
To keep Retweets, you would have to edit the tweets.js file and remove the Retweets before using it.
wow...is there any way to delete only replies to other tweets?
Thanks in advance
You would need to remove all non-replies from the tweets.js file before using it to delete the rest.
tweeter is very slow to give us our own data...
I can’t find the browser console. I’m using Mac OS and Safari browser. Any ideas?
I recommend to use Firefox for this.
If you really want to use Safari, go to Settings (Safari -> Settings), select 'Advanced', check the box at the bottom 'Show features for web developers', close Settings, select the new 'Develop' at the top and select 'Show JavaScript Console'.
bro i have 23k tweet whene and this mathods crash my pc and restart any solution !
Use Firefox and the tweet-headers.js file.
I've been fixated recently on deleting all my retweets. Will this method delete/undo all my retweets?
Yes. It will remove all Tweets and Retweets.
@@LucaHammerTube wow thanks a lot man, I'll go give this a try cos I've tried so many scripts over the last 3 days to undo all my retweets. Nothing shows on my profile anymore but it still shows 18k tweets on the header and when I use another account to search up keywords, they pop up even tho nothing appears on my profile originally.
I'll go give this method a try and if it works and it goes from 18k tweets to 0, I'm definitely subscribing and getting you more subscribers and getting this video out there.
@@countjacques Let me know how it went. The counter won't go to zero, but close and you won't find any of the Tweets anymore.
Biggest account I got a success message yet, had nearly 120k Tweets. chaos.social/@pascoda/111200720370330316
@@LucaHammerTube omg man it works!!!!!! Thanks so much! It deleted it from 18k to 8k tweets and then it encountered an error. so should I just rerun the script again or should i request a new download of archives of my new 8k tweets left before running the script again?
@@countjacques Run the script again. But before selecting the file, click on "Advanced Options" beside the button and enter 10000 or something like that in the field that shows up below the file selection. The script will then skip that amount of Tweets from the file.
You are probably using an Chrome based browser which seem to not go above 10k Tweets per run. Firefox should not have that limitation, but re-running works fine as well.
when i paste the script, it gives me an error. what should i do?
What does the error say? Have you tried to run it with Firefox?
It writes: Source map error: Error: Network error when trying to fetch resource.
And there are other bunch of errors there
can i still acces my tweets in the archive after deleting
Yes, the archive is a zip-file on your computer. As long as you don't delete that, you can decompress it and access your Tweets there. But they won't be accessible by anyone else anymore. Unless you upload them somewhere else.
finally got an email from twitter with data and turns out its just one page. did I do something wrong ? please help.
What do you mean by "one page". In the zip file?
@@LucaHammerTube actually it isn't working for some reason
I am not seeing the blue popup after running the script in console
me too, did you solve it?
gives me this error
VM378:180 Uncaught TypeError: Cannot read properties of undefined (reading 'getAttribute')
at Object.createUploadForm (:180:58)
at Object.init (:40:14)
at :401:11
createUploadForm @ VM378:180
init @ VM378:40
(anonymous) @ VM378:401
Please try the new version: github.com/lucahammer/tweetXer/blob/main/tweetXer.js
the script is not working now i don't know why
What error do you get?
Please help. I downloaded the data but it's not in the download folder.
Sorry, I can't help with that. Maybe you chose a different location when downloading?
heard like 1,000 "umm"
This doesn't cause any account suspensions right?
There is always a risk and I have seen one report where an account got suspended.
God bless your soul
why do we need to export our twitter archive?
Else the script would have to load the Tweets before removing them and that's slow and unreliable. The Twitter archive includes all IDs and so it can immediately start with deleting them.
is this useful only on laptops? I only have a smartphone
Yes, it needs the browser console which most mobile browsers don't have.
I never tried it, but something like Eruda with the eruda-code plugin (github.com/liriliri/eruda) should allow you to use the browser console on a smartphone.