Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bracca95/c12c1356521421b02545bc574ac48a9c to your computer and use it in GitHub Desktop.
Save bracca95/c12c1356521421b02545bc574ac48a9c to your computer and use it in GitHub Desktop.
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
/* define a function to delete likes */
function unLike() {
	for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
		d.click();
	}
	// scroll window by 500 lines
	window.scrollBy(0, 500);
}

/* call it every 5000 ms (can be changed) */
var myProc = setInterval(unLike, 5000)
  1. When the bottom is reached, type:
/* stop the process */
clearInterval(myProc)
  1. Don't forget to checkout how to remove your tweets and retweets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment