How to delete old Facebook posts from the browser console

You're here because you want to delete posts form Facebook? Good, keep reading.


I wanted to be able to delete specific years of posts. I wanted to delete my old posts keeping the new alive. As of this writing Facebook does not let you delete posts in bulk, the UI is garbage and full of modals. I guess in an attempt to dissuade you from deleting the data.

You can delete all the data but not targeted years.

How to see your old posts?

The current URL if the following, again it might've changed by the time you read this.

If you access through the menus try something like Settings > Privacy > Timeline > Posts


The concept is quite simple. Mimic what you would do with your mouse with JavaScript. The core functionality of the script is given by setInterval and setTimeout, then we simply perform click() on certain elements.

The script relies 100% on the markup, Facebook might change that. Use at your own risk, the code might not work. I don't think it might be dangerous but could simply not find the DOM elements needed to perform the actions.

Have a look and enjoy!

Last thoughts

If you're interested in privacy and sharing your point of view, read my thoughts on my other blog.

About Rick

Senior Front-end Software Engineer from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

Leave a Reply

Add <code> Some Code </code> by using this tags.