Skip to content

Instantly share code, notes, and snippets.

@mattscripted
Last active May 14, 2023 01:58
Show Gist options
  • Save mattscripted/156c26d507b16ff53cd259558ec01a10 to your computer and use it in GitHub Desktop.
Save mattscripted/156c26d507b16ff53cd259558ec01a10 to your computer and use it in GitHub Desktop.
Remove all videos from "Watched Later" on YouTube

Remove all videos from "Watched Later" on YouTube

For whatever reason, YouTube's "Removed watched videos" button has not worked for years. But since I've maxed out my "Watch Later" list, I can't add anything until I remove videos.

So, this script simply goes through every video in the list and removes it.

With 5,000 videos, it will take about 42 minutes.

function removeFirstVideo() {
// Find the first video's menu button, and open the menu
const firstVideoMenuButton = document.querySelector('ytd-playlist-video-renderer button')
firstVideoMenuButton.click();
// Wait a bit for the menu to open before clicking
setTimeout(() => {
// Click the "Remove from Watch Later" item
const removeVideoMenuItem = document.querySelector('#items > ytd-menu-service-item-renderer:nth-child(3) > tp-yt-paper-item');
removeVideoMenuItem.click();
}, 100)
}
function removeAllVideos() {
setInterval(removeFirstVideo, 500);
}
removeAllVideos();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment