loading...
Cover image for Unsubscribe all YouTube channels at once!

Unsubscribe all YouTube channels at once!

manitej profile image Manitej ⚡ Updated on ・1 min read

Without any boring intro, let me get straight to the point.

  1. Go to this link

Alt Text

  1. Right-click and go inspect then go to console

Alt Text

  1. Now copy the below script and paste it on the console
function youtubeUnsubscriber() {
    var count = document.querySelectorAll("ytd-channel-renderer:not(.ytd-item-section-renderer)").length;
    var randomDelay = 500;

    if(count == 0) return false;

    function unsubscribeVisible(randomDelay) {

        if (count == 0) {
            window.scrollTo(0,document.body.scrollHeight);
            setTimeout(function() {
                youtubeUnsubscriber();
            }, 10000)
        }

        unsubscribeButton = document.querySelector('.ytd-subscribe-button-renderer');
        unsubscribeButton.click();

        setTimeout(function () {
            document.getElementById("confirm-button").click()
            count--;
            console.log("Remaining: ", count);

            setTimeout(function () {
                unsubscribedElement = document.querySelector("ytd-channel-renderer");
                unsubscribedElement.parentNode.removeChild(unsubscribedElement);
                unsubscribeVisible(randomDelay)
            }, randomDelay);
        }, randomDelay);
    }

    unsubscribeVisible(randomDelay);
}

youtubeUnsubscriber();
Enter fullscreen mode Exit fullscreen mode
  1. Hit enter and wait for some time to see the magic

Alt Text

After all are done, refresh the page.

Alt Text

Discussion

pic
Editor guide
Collapse
robcodes profile image
RobCodes

Whish I had this for about 10k email subscriptions over the years.

Collapse
manitej profile image
Collapse
pavelloz profile image
Paweł Kowalski

Why not just turn off notifications on yt?

Collapse
billraymond profile image
Bill Raymond

I’m 30 followers from monetizing my little corner of YouTube, so please don’t use this code if I am in the list :)

Collapse
nikhilmwarrier profile image
Nikhil M Warrier

Now make one that can delete all files in a GitHub repo branch. I am too lazy to go to the CLI, and the web ui of GitHub doesn't allow selecting or deleting multiple files...
Please and thank you in advance
😅👍

Collapse
craigdennis profile image
Craig Dennis

Can this be done on Twitter?

Collapse
manitej profile image
Manitej ⚡ Author

Unfollowing everyone at once?

Collapse
pavelloz profile image
Paweł Kowalski

Another excercise: How to remove all my comments from all videos on YT? ;)

Collapse
cumaniar profile image
Collapse
nikhilmwarrier profile image
Nikhil M Warrier

Awesome tip. But I suppose YouTube might crash if i did that to all my 5M subscriptions....
Just kidding 😂

Collapse
manitej profile image
Collapse
andrewbaisden profile image
Andrew Baisden

Wow this would have been useful when I had 100+ channels that I was trying to sort. Starting from scratch might have been easier.

Collapse
manitej profile image
Manitej ⚡ Author

I have 500+ 🤐 So this trick is godsend for me!

Collapse
mbaapohz profile image
Mbaapoh

Hahaha

Collapse
rolypolie profile image
Sky

😂 this is great to unsubscribe all those tutorial channels I kept subbing too over the years.. everyone promised me to be a master at JS in just 6 hours lol.

Collapse
manitej profile image
Manitej ⚡ Author

This is exactly what I used this trick for!