How to unsubscribe from all the Youtube channels at once?

Youtube Channel Unsubscriber (Works April-2020)

  • Access the link : https://www.youtube.com/feed/channels
  • Press F12
  • Insert the code below in your 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();

References

  • https://github.com/vinnyfs89/youtube-unsubscriber

Updating the answer provided by everyone else (as the latest update did not work for me):

var i = 0;
var count = document.querySelectorAll("ytd-channel-renderer:not(.ytd-item-section-renderer)").length;

myTimer();

function myTimer () {	
    if (count == 0) return;

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

    setTimeout(function () {
        var unSubBtn = document.getElementById("confirm-button").click();
        i++;
        count--;

        console.log(i + " unsubscribed");
        console.log(count + " remaining");

        setTimeout(function () {
            el = document.querySelector("ytd-channel-renderer");
            el.parentNode.removeChild(el);

            myTimer();
        }, 250);
    }, 250);
}

For me this did the trick.


Step 1: Go to https://www.youtube.com/feed/channels and scroll to the bottom of the page to populate all items to the screen.

Step 2: Right-click anywhere on the page and click "Inspect Element" (or just "Inspect"), then click "Console", then copy–paste the below script, then hit return.

Step 3:

var i = 0;

var myVar = setInterval(myTimer, 3000);

function myTimer () {

    var els = document.getElementById("grid-container").getElementsByClassName("ytd-expanded-shelf-contents-renderer");

    if (i < els.length) {

        els[i].querySelector("[aria-label^='Unsubscribe from']").click();

        setTimeout(function () {

            var unSubBtn = document.getElementById("confirm-button").click();

        }, 2000);

        setTimeout(function () {

            els[i].parentNode.removeChild(els[i]);

        }, 2000);

    }

    i++;

    console.log(i + " unsubscribed by YOGIE");

    console.log(els.length + " remaining");

}

Step 4: Sit back and watch the magic!

Enjoy!!

NOTE: If the script stops somewhere, please refresh the page and follow all four steps again.