49 ms·
DeleteFB: Selenium script to delete all of your Facebook wall posts
- rashomon 7y agoYou need to add a requirement that you had Chromedriver installed. I had Chrome, homebrew and Python3 installed originally but without running: brew cask install chromedriver The script wouldn't work. Works great now!
- anaphor 7y agoThanks! I just added a note to the README mentioning it. I'm not sure how I forgot it.
- corbett3000 7y agoOP: I'm close to getting this to run but I get this error: Traceback (most recent call last): File "./deletefb.py", line 3, in <module> from seleniumrequests import Chrome ImportError: No module named seleniumrequests Any idea what's to be done?
- deleted 7y ago[deleted]
- anaphor 7y agoSounds like you're trying to run it from source? If so the steps would be: 1) virtualenv -p $(which python3) ./venv 2) source ./venv/bin/activate 3) pip install -r requirements.txt Then you should be able to run it, assuming you have google chrome and the chromedriver installed. It's called "chromium-chromedriver" on Ubuntu
- SteveNuts 7y agoWhat do you think the chances are that Facebook actually does any delete operation on their data? I'm sure this is simply marking it as hidden in their database. Maybe I'm just paranoid, but to me the only way to take back something you say on social media, is to never have posted it in the first place.
- mdjasper 7y agoThere are a million reasons to agree that the data is never actually deleted * need to retain data to fulfill government requests * internal auditing * it's all backed up in some "data lake" somewhere to do internal ml or analytics on * hundreds of copies in database backups from different times * internal logs that contain the data * it's already been analyzed and aggregated into learning products and models that aren't going to be recomputed It's not being "paranoid". As someone who has worked on large scale saas, I say: there is zero, 0, ZERO, 0.00 chance of that data every actually being deleted
- nkassis 7y agoRight and deleting is usually expensive in large systems it's easier to thombstone and delete later
- ForHackernews 7y agoEver is a very very long time indeed. Facebook will go out of business or get sold eventually and delete it all to save money or by accident. See also: Myspace accidentally dumping everything pre-2015 https://www.engadget.com/2019/03/18/myspace-lost-12-years-music-photos/ https://www.engadget.com/2019/03/18/myspace-lost-12-years-mu...
- monocasa 7y agoFor similar reasons, I doubt very much that they actually deleted everything they said they did. I know that they were backing up to tape and storing it at Iron Mountain years prior.
- dx034 7y agoBut someone has to pay that bill. If Facebook ever fails, I doubt that someone would keep data centers full of information around without getting paid.
- 7y ago
- ivan_ah 7y agoThis is beautiful: succinct and powerful. Back in the day there was a similar js bookmarklet that could be used to export all your friends' contacts (name + emails) so you can leave without worrying that you'll be missing out on all your "connections." It would be nice to extend this with a "backup my posts + contacts" info before deleting everything.
- llamataboot 7y agoI was just thinking the same thing. Seems like it would be easy to pop the text (and even comments) into some sort of structured dataset for archiving's sake.
- nostalgk 7y agoDoes anyone know if there is an equivalent to delete Facebook friends or unlike pages/leave groups? I really want to clean out my Facebook since I've had it for a very long time and much of it doesn't appeal to me anymore, but I don't necessarily want to lose the tiny social ecosystem I've created with my family. However, I would like to remove the hundreds of friends and pages that I don't talk to/don't represent me/are mining my data even more than the platform is.
- j-c-hewitt 7y agoI am in the same boat. It should be a lot easier to scrub your FB with the default tools.
- nostalgk 7y agoAgreed. Currently, the only way seems to be to go to each page and click the button.
- celestialcheese 7y agoI did it a while back (3 or so years ago) by scrolling through the dialog so that all of my "friends" were loaded, and then opened up the browser console and wrote a line of JS to toggle the checkbox to delete each of them and saved. Not sure if that's still the interface today, but it worked for me back then. * Edit: I checked, and you can still do this. It's under the main preferences dropdown -> News Feed Preferences -> Unfollow people and groups to hide their posts It's no longer a checbox, but you can simulate a click in JS. Haven't tested so obviously YMMV
- sdrinf 7y agoI did this a year ago, and it considerably improved my Fb feed’s signal/noise ratio. Specific procedure I’d recommend is to make this a regular process: open fb feed, read until you find a thing which does not improves your life, click on owner (author / group) -click “friend” -> unfollow. Iterate until sanity is restored. And one moral of this story (hi Facebook, please understand this) is that people are multidimensional. Just because you know someone once, in one context in real life, does not, actually, imply positive relationship on informational ecologies for all time in the future. “Authentic self” as defined by Facebook as a single coherent identity is a lie.
- AdmiralAsshat 7y agoI don't trust the "delete" button to scrub it from FB's database. I'd be slightly more confident (slightly) that editing the post might cause the core data in the db to be updated, however. In which case, I think the more effective script would be one that goes through all of your FB posts and scrambles them, or replaces the text with gibberish.
- luckylion 7y agoOr insert GPT2-generated essays about post-modern privacy models. Regularly. Generate noise, and lots of it.
- flattone 7y agoprobably safe to say that the idea of a user on a platform like Facebook trying to obfuscate their history on the platform... is a short jog from an individual trying to avoid government backed hacking on them. Facebook has many years of pretty smart work, and probably safe to say tens of millions of dollars just in meetings about specifically this (re costs associated with effort of user data retention).
- luckylion 7y agoWhat will be the consequences though? I'm sure they can easily discover that the user is trying to overwrite his history, batch edits are easy to spot - but what will they do about it? Ban him & delete his data? Stop him from editing his own posts? Just throw away all changes that don't pass the smell test?
- flattone 7y agoI would speculate that they have built systems in a way that it would not matter what any user does. any edits to a already existing post probably just append
- snazz 7y agoPost-modern privacy models include those developed by University of Chicago law professor Richard Hasen, who argued the Obama administration could regulate Facebook under the guise of protecting privacy. (He was later fired from his posts.) Other authors have argued that allowing Facebook users to choose what information they share online would weaken privacy, and that if Facebook were able to take over the content management systems of websites and allow people to censor content, that was something the First Amendment should prohibit. https://talktotransformer.com https://talktotransformer.com It’s really good.
- leesec 7y agoAny chance a feature could be added to delete posts by year? Would love to scrub like 5 years or so but keep some more relevant memories. Thank you.
- Peyphour 7y agoIs there a guarantee that `pip install` download the exact same script as the GitHub one ? If not it seems risky.
- alexmorley 7y agoYou can do pip install git+https://github_repo_url https://github_repo_url if you want
- temp99990 7y agoIs there a “Marie Kondo” for the digital world? Seems like something or someone that could be just as relevant if not more than organizing your physical world.
- eswat 7y agoThe book Digital Minimalism by Cal Newport has a concept called Digital Declutter that’s a similar concept but towards distracting tech.
- new_here 7y agoAbout a two years ago my friends and I used to scroll back into each other’s posts from the early days and ‘like’ some of the most cringeworthy posts and photos we could find. It would cause them to bubble up into everyone’s newsfeeds again. Was a fun game. This script would have saved me some manual labour back then. (Edit: we also used to endorse each other on LinkedIn for the most bizarre skills we could find. Toilets, divorce and animal husbandry to recall a few)
- bryanrasmussen 7y agocombine with a bayesian classifier trained on cringeworthy content?
- paulddraper 7y ago> Was a fun game. Yikes, sounds like it.
- SmellyGeekBoy 7y agoI'm so glad Facebook wasn't around when I was a teenager...
- jxcl 7y agoA fun artifact of deleting your facebook account is that all of your comments get deleted (hidden, I guess, is more accurate) too, which means that in old threads people who interacted with you now appear to be interacting with themselves. My friend had a profile picture in which he was doing something silly with his eyebrows. I commented "Nice eyebrows" and he replied "You're just jealous." I've since deleted my account and now there is only one comment on this profile picture, by the person the picture is of, reading "You're just jealous."
- blhack 7y agoAww, man. This just made me scroll way back to 13 years ago, and this is exactly why I love facebook. Obviously I said some stupid things when I was 18, but I was a child. But it was really cool looking back at the much more romantic version of myself when I was a kid.
- synaesthesisx 7y agoIs there a way to export the data beforehand? Just in case there are old photos or anything one may potentially want to keep saved...
- digianarchist 7y agohttps://www.facebook.com/help/1701730696756992?helpref=hc_global_nav https://www.facebook.com/help/1701730696756992?helpref=hc_gl... See "How do I download a copy of my information on Facebook?"
- mynameisvlad 7y agoFacebook offers a data export: https://www.facebook.com/help/1701730696756992?helpref=hc_global_nav https://www.facebook.com/help/1701730696756992?helpref=hc_gl...
- spieglt 7y agoI wrote a similar tool in Node a while back that can delete by year and category: https://github.com/spieglt/fb-delete https://github.com/spieglt/fb-delete And one to download all "Photos of you", which Facebook doesn't include when downloading your data: https://github.com/spieglt/fb-photos https://github.com/spieglt/fb-photos
- hombre_fatal 7y agoOuch, almost all of my pictures of me have been uploaded by other people. I had this suspicion yet kept telling myself I'd once build it. Thanks for the heads up. I hate the pic attrition on Facebook. As people unfriend me or delete albums, some of the best moments captured of my life are erased. They really should be included in the archive download and more strongly link to your account.
- corbett3000 7y agoNice. Running Fb-Delete. I couldn't get the DeleteFB to work so I'm running yours instead. Any idea how long it takes if you got 1000s of posts?
- brujoand 7y agoDid you get it to work? It just hung after an uncaught exception for me. Edit: had to disable 2FA to get it to work.
- Jaruzel 7y agoSeeing as we're sharing, here's my (previously posted to HN) effort: https://github.com/Jaruzel/DeleteFacebookActivity https://github.com/Jaruzel/DeleteFacebookActivity It works very well, but needs Windows.
- spieglt 7y agoHeh, your blog post about that was the inspiration for mine, thanks.
- dbg31415 7y agoWait about a week, guessing this won't work if it builds up any significant traction. I want the ability to delete everything after some period of time. Every message I send, every message I receive, I want it all to work like conversation -- not contracts. I don't want someone digging up an email from the past where I said something stupid in a moment of anger, or frustration. If all tech worked like Snap Chat, or Signal, I'd be really happy. I have no trust that Facebook actually deletes anything. Guessing anyone who tries to delete things actually flags the user and then their team of Zucks go in and look at the juicy content you were trying to delete... seems like 5 years from now, Facebook will charge for the "not have anything dumb you said in your 20s show up in public search" feature. Cool. Cool, cool, cool.
- 2Ccltvcm 7y agoOversec might be able to help you https://www.oversec.io https://www.oversec.io
- billions 7y agoWould prefer migration to a decentralized alternative
- scotchio 7y agoThere needs to also be an obfuscate profile method. Any data is probably never deleted. What makes more sense if a long running script (multiple years??) that updates / inserts / deletes your profile with random information.
- izzydata 7y agoI can't imagine this is more likely to actually delete the data on their end than just deleting your whole account. However, I am really interested in learning more about Selenium so I'm curious to look at your project.
- a-wu 7y agoSimilar, but OT: does anyone know of a script that will delete your tweets from before X date? There's tools that bulk delete, but I want to delete from before a certain date.
- kylehotchkiss 7y agoJumbo App is easiest! IIRC twitter's API doesn't allow you to bulk delete tweets from the outside. I've found that exporting all tweets, getting the IDs, and then deleting them in the browser using the twitter.com only browser API will allow you to delete tens of thousands of tweets with no rate limits. I did something similar here: https://github.com/kylehotchkiss/fakeblock https://github.com/kylehotchkiss/fakeblock but it's not documented well and Twitter's export file format actually tends to change on a somewhat regular basis.
- billysielu 7y agoI've been through this before and some posts 'came back'. The only way to be sure is to delete your account. If you really want an account just make a new one.
- DerfNet 7y agoThis was my experience using a Greasemonkey script some time ago. Some posts would "come back", and there were pockets years back it couldn't even find to delete, but were still accessible on my profile. Wound up just deleting my account and making a new one that I never, ever post on.
- nickpsecurity 7y agoThis says wall posts. Im sure there's plenty of people that would like one for comments, too. Anybody know scripts for that?
- dmead 7y agowell, shoulda posted this ages ago https://github.com/chriszimmerman/fbcleaner https://github.com/chriszimmerman/fbcleaner
- idonotknowwhy 7y agodoes this one still work?
- dmead 7y agoI have no idea.
- adzm 7y agoRegarding selenium, is there a better way to wait for a specific state or element etc rather than simply sleep for a few seconds?
- kyoob 7y agoIt's considered a better practice to explicitly wait for an element on a page before acting. How to do it is documented for the Python bindings here: https://selenium-python.readthedocs.io/waits.html https://selenium-python.readthedocs.io/waits.html
- deleted 7y ago[deleted]
- anaphor 7y agoI'm working on fixing that, however it's a bit tricky because Facebook does some very weird things with Javascript that seem to interfere with Selenium. In particular, the only way I could get it to actually focus on the "Delete" button was by dropping down to Javascript. I'm not sure why this was. I also ran into issues with the Gecko driver initially where I couldn't get it to open the delete menu at all.
- amelius 7y agoFacebook throttles me when I delete posts manually. So doing this automatically will only make it worse.
- kylehotchkiss 7y agoHmm, I was catching this same issue while running this script today. Only in the chrome instance that Selenium opened though. Facebook was working at normal speed in my primary chrome instance.
- e1ven 7y agoI've seen other people recommend the Social Book Post Manager extension [1] in the past. One of the nice things is you have more granularity in what you remove - You can leave things that mention certain words, or in a date range, etc. Because it runs in your browser, it should work with MFA logins, etc, without submitting credentials to an external service. [1] - https://chrome.google.com/webstore/detail/social-book-post-manager/ljfidlkcmdmmibngdfikhffffdmphjae?hl=en-US https://chrome.google.com/webstore/detail/social-book-post-m...
- Vordimous 7y agoSo I have been putting together a way for people to more easily make their own blogging platform. It would kind of mimic a social media platform, but since everything is committed to a repository using the JAMstack it could easily be converted to a full website or in your case you could simply delete the repository or any number of your posts because they are just files in your repository. Any feedback would be wonderful. https://your-media.netlify.com/post/make-your-own-media/ https://your-media.netlify.com/post/make-your-own-media/ Everything is owned by the end user. This is only providing a recipe for people to use. I will also mention that https://www.stackbit.com/ https://www.stackbit.com/ is doing basically the same thing but more from a “Make life easier for Website designers” perspective.
- cfarm 7y agoTo my knowledge, there is no way to actually do this correct?
- 2Ccltvcm 7y agoSome sure fire ways to get your account actually deleted, and quickly: post large amounts of hardcore porn, extreme gore, and anything that puts Jews in a negative light like Nazi symbols combined with the prior two methods. The moderation team will nuke your accounts very efficiently.
- Helloworldboy 7y agoYeah that’s exactly what I want to spam all over a network filled with my friends and family
- chimpburger 7y agoAlso, anything criticizing Islam or LGBTTQQIAAP rights
- chimpburger 7y agoWhy was my reply flagged? This has actually happened for some FB users. My flagged reply was: "Also, anything criticizing Islam or LGBTTQQIAAP rights"
- throwawaysea 7y agoWhat about something to scrub comments, or photos or likes (on others' content)? Is there a similar script available?
- pxtail 7y agoI'm wondering - won't it trigger some antiscrape / antibot measures and lock account?
- siquick 7y agoIs there anything similar where i can see all of my posts on one page and just check a series of checkboxes to delete the ones I want rid of?
- nounounome 7y agoFacebook keeps all the posts or references to posts in a proprietary graph database.
- EGreg 7y agoFacebook will just rate limit you
- stendinator 7y agoI did have this happen to me when I tried to delete many of my posts at once.
- srpguy 7y agoKudos - this is very much useful. Anybody know of a script that will wipe all content from facebook?
- GaryNumanVevo 7y agoHere's a good app idea: Take all your facebook posts and replace them with copywrited sections of books. I.g. my cringy posts from highschool become chapters from Harry Potter. No doubt Facebook would delete these posts permanently and DMCA them.
- incompatible 7y agoOnly if somebody complains, I expect, e.g., a DMCA takedown from the publisher. You could also have your account banned as a repeat copyright infringer, which I suppose would be a bonus in this case. I'd advise against it though, at least in the USA, due to the commercial value of the Harry Potter novels, and the penalties for infringement.
- flattone 7y agobut what would that help anyway?
- haser_au 7y agoThis may work against you, especially if Bloomsbury Publishing issues an infringement notice to Facebook. In that scenario, Facebook need to place your account on 'legal hold', retaining the account and history indefinitely while the copyright case is resolved. It's possible this would be cold-storage and all past edits.
- terminally_ill 7y agoExactly the reason why I stopped using sources like Unsplash for free graphics when I was as a young designer. Imagine the Enis' surprise when their shiny new website came under attack by a zealous photographer for copyright infringement. This woman is now a chief editor for a major publisher. This is an awesome idea though, I think I'm going to go with Hunter S. Thompson though. ]:\
- VirenM 7y agoCould you give more context to this story, perhaps a link?
- tuxpenguine 7y agoIn most of the tech companies, deleting only means flipping a flag in the column of the row so that those things won't show up to the user. "Hard delete" is what you want.
- anticensor 7y agohttps://news.ycombinator.com/item?id=19965287 https://news.ycombinator.com/item?id=19965287 seems to disagree.
- red_hare 7y agoAlternatively, my friend turned on the "on this day" feature that would send her a notification every day of what she did on facebook for that day of the year. So every day she just took a minute to the cringiest of that 1/365th of her content and in just one year she was free.
- markholmes 7y agoSo it takes an entire year to maybe disassociate yourself from Facebook?
- RhodesianHunter 7y agoNo, it takes a year to clean out the stuff you want cleaned out if you want to remain on Facebook and not sit down to the task for hours.
- OBLIQUE_PILLAR 7y agonow how do i delete all of the comments ive left on facebook posts?
- anticensor 7y agoYour comment is gone if post author removes his post.
- ndesaulniers 7y agoWhenever I try to delete old Facebook posts, I just get indefinite loading bar. Shrugs Seems like a well tested feature. /s (or maybe my posts are just stored in ice).
- robertAngst 7y agoOne of your friends were probably hacked and data mined your facebook anyway.
- m3kw9 7y agoHow about name it rm -rf for fb
- holler 7y agoafter a decade of use I just permanently deleted my account on a whim, then was told it will be deleted in 30 days...
- robertAngst 7y agoI want scrape, save, delete. So I can have my old thoughts
- calimac 7y agoFuck facebook
- idonotknowwhy 7y agoGot one for linkedin and discord?
- deleted 7y ago[deleted]
- fuckamerica 7y agoIf you don't trust FB, deleting the posts from client side makes no difference
- neiman 7y agoFantastic! Now the same for Firefox please.
- bluehatbrit 7y agoI'm a user and fan of FF, I left chrome a while back now, but for one piece of one-off automation why couldn't you use Chrome?
- neiman 7y agoMy new year resolution for 2019 was to keep my computer Google free. It's less of a statement and more a "fun" geeky game. So I rather not install Chrome:-)
- anaphor 7y agoIf you can get this to work with the Gecko driver that would be fantastic. I initially tried using Gecko and ran into some difficult to debug issues, but it might be possible now.
- kylehotchkiss 7y agoLove this script! I'm trying to use it to wipe 10 years of Facebook dumbness. It can handle about a month's worth of posts before it crashes though. Is there any try/catch/repeat loops you could add to resolve this? Message: no such element: Unable to locate element: {"method":"class name","selector":"layerConfirm"} Or... is there a Python equivalent of "nodemon" I could run it behind? Thanks for the great work! I was thinking Jumbo.app would implement something similar by now but I realize the problem was hard to solve because facebook doesn't let apps delete posts.
- anaphor 7y agoThere should be a fix for this released soon. Thanks for trying it out! I believe it is a race condition which wasn't handled in the most elegant way.
- way66 7y agowe are working on facebook.... :) CEO, Jumbo Privacy.
- kylehotchkiss 7y agoSuper excited to test it, didn't intend for facebook piece to be a criticism of your app, which I highly enjoy and use regularly.
- sidcool 7y agoSweet and Simple. I have the habit of writing complex scripts leaning of super clean code that deviates from the actual purpose. This is so clear. I could understand the code in 5 min...That means it's super simple. And looking at the votes it has received, it works! Great work fellow programmer.
- lawlessone 7y agoHow long will this work for?
- dontbenebby 7y agoAt least FB lets you remove them from public view. I recently tried to script clearing out my twitter linkes. (Some of which date back to before <3s, when a star could mean "yikes, I don't want to RT this but I want to note it". Others were just from when my twitter was more personal, and now that I use it for professional purposes I don't need random likes from the 2012 election lying around. But Twitter now says I have about 4k likes, but only displays the ones since I tried to run my script. Occasionally, a weeks or months later older ones resurface, but if I try to unlike them in bulk they disappear again to return at a random interval.
- edisonjoao 7y agoDelete Facebook and download the new way to connect http://foxie.cool http://foxie.cool
- edisonjoao 7y agolove this