Skip to content

Instantly share code, notes, and snippets.

@mahadevan
Created July 26, 2026 15:38
Show Gist options
  • Select an option

  • Save mahadevan/ce6b11a4151ef03949377833cbb61636 to your computer and use it in GitHub Desktop.

Select an option

Save mahadevan/ce6b11a4151ef03949377833cbb61636 to your computer and use it in GitHub Desktop.
YouTube Watch Later Remove Script (2026 Working Script) - Use it on chrome developer console
(async () => {
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
if (!confirm(
"Remove ALL videos from Watch Later?\n\n" +
"This repeatedly uses YouTube's normal Remove from Watch later command."
)) return;
let removed = 0;
while (true) {
const video = document.querySelector("ytd-playlist-video-renderer");
if (!video) {
console.log(`Finished. Removed ${removed} videos.`);
break;
}
const title =
video.querySelector("#video-title")?.textContent?.trim() ??
"(unknown video)";
const menuButton =
video.querySelector('button[aria-label="Action menu"]') ||
video.querySelector('yt-icon-button#button button') ||
video.querySelector('#menu button');
if (!menuButton) {
console.error("Could not find menu button:", video);
break;
}
console.log(`[${removed + 1}] Removing: ${title}`);
menuButton.click();
// Give YouTube time to render the popup menu.
await sleep(400);
const menuItems = [
...document.querySelectorAll("ytd-menu-service-item-renderer")
];
const removeItem = menuItems.find(item => {
const text = item.textContent.trim().toLowerCase();
return (
text.includes("remove from watch later") ||
text.includes("remove from")
);
});
if (!removeItem) {
console.error("Remove menu item not found.");
console.log(
"Available menu items:",
menuItems.map(x => x.textContent.trim())
);
break;
}
removeItem.click();
removed++;
// Wait for YouTube to remove/update the row.
await sleep(650);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment