Skip to content
SimplyMe
Go back

Bulk Unsubscribe from YouTube Channels

If you have ever found yourself subscribed to hundreds of YouTube channels over the years and want to clean house, you know the pain. YouTube does not provide a built-in way to bulk unsubscribe. Clicking through each channel manually is tedious and time-consuming.

Here is a simple JavaScript snippet that automates the process directly in your browser.

The Script

Copy and paste this into your browser console while on the YouTube channels page:

(async function iife() {
    const UNSUBSCRIBE_DELAY_TIME = 2000; // delay in ms

    const runAfterDelay = (fn, delay) =>
        new Promise(resolve => setTimeout(() => {
            fn();
            resolve();
        }, delay));

    const channels = Array.from(document.querySelectorAll("ytd-channel-renderer"));
    console.log(`${channels.length} channels found.`);

    let ctr = 0;
    for (const channel of channels) {
        const unsubscribeBtn = channel.querySelector("[aria-label^='Unsubscribe from']");
        if (!unsubscribeBtn) {
            console.log(`Skipped channel ${ctr + 1} (no unsubscribe button).`);
            ctr++;
            continue;
        }

        unsubscribeBtn.click();

        await runAfterDelay(() => {
            const dialog = document.querySelector("yt-confirm-dialog-renderer");
            if (dialog) {
                const confirmBtn = dialog.querySelector("[aria-label^='Unsubscribe']");
                confirmBtn?.click();
                console.log(`βœ… Unsubscribed ${ctr + 1}/${channels.length}`);
            } else {
                console.warn(`⚠ Dialog not found for channel ${ctr + 1}`);
            }
            ctr++;
        }, UNSUBSCRIBE_DELAY_TIME);
    }

    console.log("πŸŽ‰ Done unsubscribing all visible channels!");
})();

How to Use

  1. Go to youtube.com/feed/channels
  2. Scroll down to load all the channels you want to unsubscribe from (the script only works on visible/loaded channels)
  3. Open the browser console: Press F12 or Ctrl+Shift+J (Windows/Linux) / Cmd+Option+J (Mac)
  4. Paste the script above and press Enter
  5. Watch the console output as it processes each channel

The script includes a 2-second delay between each unsubscribe action to avoid triggering any rate limits.

How It Works

The script queries the page for all channel elements (ytd-channel-renderer), then for each one:

  1. Finds the unsubscribe button by its ARIA label
  2. Clicks it to open the confirmation dialog
  3. Waits for the delay period
  4. Clicks the confirmation button
  5. Logs progress to the console

The runAfterDelay helper uses a Promise to ensure each action completes before moving to the next channel.

Safety Notes

Alternative: Manual Clean-Up

If you prefer a more controlled approach:

Wrapping Up

This snippet has saved me hours of tedious clicking. Your subscription feed becomes much more manageable when you trim channels you no longer watch. Use it responsibly and happy cleaning!


Share this post:

Previous Post
asdf vs mise: Choosing Your Polyglot Version Manager
Next Post
Beyond MVC: Architecting for Maintainability