Full disclosure, I pulled these scripts from a Quora forum. I have tested them and they do work. I am by no means responsible if you decide to screw up your facebook or if you're upset when you really do unfollow everyone. I also have no control over this working long term, it works now but Facebook could shut it down if they decide to anytime. 
1. You must use Google Chrome to do this.
2. Open Chrome and Go to Facebook. On your keyboard press Ctrl+Shift+J or find your way to Developer Tools through the More Tools option of Chrome settings. (Google is your friend). This will open a window inside the frame with Facebook on the left. Select the Console tab on the right in the developer tools.
3. At the Facebook Home menu click on the down arrow to choose News Feed Preferences.
4. Click on “Unfollow people to hide their posts” and then select friends from the option.
For Scrolling down to the bottom of the query use this code. Just copy and paste below code in the console and hit Enter. Depending on how many people you follow this could take a little bit of time for the code to complete. You'll notice the list scrolling down automatically. Wait for it to finish. 
var unf = document.querySelector('[data-testid ="unfollow"]');
var scr = unf.querySelector(".scrollable");
scr.scrollTop = scr.scrollHeight;
}, 200
5. Now you will execute the code that will choose all listed. 
var a = document.getElementsByClassName("_5u3n");
var x = 0;
var time = 300;
function amol(){
if(x++ < a.length){
setTimeout(amol, time);

6. Be patient, it could take a minute or two for it to select all. Once all are chosen you can click Done. You've now unfollowed everyone. 

7. This is where you can start categorizing people into Close Friends, Acquaintances, or any sort of custom group you want. Keep in mind Close Friends are added to your Follow list. 
Good luck, and enjoy!
Back to Top