How to unfollow Facebook friends at once with this simple step

Here’s a quick way to unfollow Facebook friends all at once with just a simple script trick for your browser which is safe and very easy to follow.

With the recent update, the interface is now straightforward and easier to navigate that’s why implementing this script is just a breeze and can be done in less than 5 minutes (depending how many friends you have).

Take note that Facebook is constantly updating their source code. This script might work for now but in the future, this might change. for reference as of the time of this posting, they have just rolled out the new dark mode look. if this script does not work just comment down below and will try to update this from time to time.

Going to the News Feed Preferences

Since the latest update of the UI /UX of Facebook, location of News Feed Preferences is now in the upper right corner. By clicking the down arrow then click Settings and Privacy.

How to unfollow Facebook friends at once with this simple step 2 » Pinoyscreencast

Then click News Feed Preferences and you will see this window. Next is to click the Unfollow button.

How to unfollow Facebook friends at once with this simple step 3 » Pinoyscreencast

Unfollow Facebook Friends Settings

And it will lead you to this window, by default when you click the drop-down arrow it is set to “All” switch that to Friends only.

This next procedure will also work with pages and groups but for now, we will just do the Friends only.

Select Friends Only wait for a couple of seconds and it will load all your friends. Make sure to scroll down until you reach the bottom part or the last list of your friends.

How to unfollow Facebook friends at once with this simple step 4 » Pinoyscreencast

Accessing Developer Tool

Most of the modern browsers have a Developer tool. This feature lets you see what’s behind the scene of your page from source code, elements, network, performance, security and many more. if you are using Google Chrome on Windows you can just press F12 or CTRL + SHIFT + I or CTRL + Option + J on a Mac. Alternatively, you can simply click the three dots in the upper right corner of your browser (Google Chrome) select the option “More Tools” and click  “Developer Tools.”

How to unfollow Facebook friends at once with this simple step 5 » Pinoyscreencast

And the Developer tools window will show up.

Next, while you are still in the “Unfollow” window on Facebook select the Console in the Developer Tools

How to unfollow Facebook friends at once with this simple step 6 » Pinoyscreencast

Then paste this line of codes. After executing you will notice in the console that it will count how many friends that it already unfollowed based on your friend list. just wait for it to finish and come back once its done.

var unfollowButtons = document.querySelectorAll('div[aria-label="Toggle to follow"]'); 
unfollowed = 0; 
     for(var i=0;i<unfollowButtons.length;i++) {
        setTimeout(function(element) {; 
        unfollowed ++; 
        console.log('Total unfollowed ' + unfollowed + ' out of ' + unfollowButtons.length) }, i*2000, unfollowButtons[i]) 

This is a modified version of this code

What you will see once you execute the code.

How to unfollow Facebook friends at once with this simple step 7 » Pinoyscreencast

Code Explanation

We have created a variable unfollowButtons, and that holds the query which looks for a div with aria-label name Toggle to follow. Take note that this is the part that might change in the future if you will check the source code of Facebook you will see this line of code if you hover the + icon.

Focus on the <div aria-label="Toggle to follow"if Facebook changes the name of the div aria-label just simply switch this to the new name in the future.

How to unfollow Facebook friends at once with this simple step 8 » Pinoyscreencast

Then we set the unfollowed variable to 0 to for the start of the counting, next in the for loop it simply means loop through all the div elements with aria-label=”Toggle to follow”  and click each element as it loop. Then log it in the console every 2 seconds.

The line i*2000is the time in milliseconds for the timeout you can change this to a higher or lower number but do take note that if you set this to lower number there is a big chance that Facebook might block you for spamming so make sure to set to a minimum of 2 seconds to be safe.

There you have it in just a couple of minutes you have already unfollowed all your Facebook Friends.

This is really helpful when you want to clean up your News Feed and filter out which among your friends you want to see on your feed.

If you have any questions feel free to post it in the comments down below.



0 0 vote
Article Rating
Show full profile

Founder of Pinoyscreencast, started using YouTube as a medium to disseminate Filipino-spoken technical tutorials. He decided to embark on reviews focusing on affordable gadgets. As he kept sharing more content, his subscriber base grew and shared how his videos influenced them in making a product purchase.

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x
Enable registration in settings - general