YouTube: Clear your ‘Watch later’ playlist automatically the simple way.

If you’re anything like me, you probably have a long list of videos saved in your YouTube Watch Later playlist. However, clearing this list can be a time-consuming and tedious process, as you have to remove each video one by one.

Fortunately, there’s a small JavaScript script that can automate this process for you. Provided by astamicu and updated by Bryan Haley, the script is on GitHub using this link: https://gist.github.com/astamicu/eb351ce10451f1a51b71a1287d36880f . If you’re in need of a version for example in Turkish, Czech or French, scroll the through the comments. (Last update by the author 22.11.2022, working as of now.).

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

    video.querySelector('#primary button[aria-label="Action menu"]').click();

    var things = document.evaluate(
        '//span[contains(text(),"Remove from")]',
        document,
        null,
        XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
        null
    );

    for (var i = 0; i < things.snapshotLength; i++) 
    {
        things.snapshotItem(i).click();
    }
}, 500);

To use the script, simply open your YouTube Watch Later playlist and press Control+Shift+J to open the JavaScript console, by default on the right pane. Ignore the written text such as warnings, error messages.

The cmd line starts with

>

if you don’t see a blinking keyboard marker, click there by hand. Then, paste CTRL+V the script provided in the link above into the console and hit enter. The script will start removing videos from your Watch Later playlist one by one.

It’s important to note that the script may take some time to complete, and you might have to restart the process if it stops before all the videos are removed. If that happens, simply press F5 to refresh the page and paste the script again.

The script uses JavaScript to simulate the process of clicking the “Remove” button for each video in your Watch Later playlist. While this is a useful tool for clearing your list quickly, it’s important to understand what the script does and use it at your own risk.

To halt / stop the process paste the following line and hit enter.

clearInterval(watchLaterCleaner);

In conclusion, if you’re looking to clear your YouTube Watch Later playlist quickly and easily. Essentially, this script automates the process of removing videos from a YouTube playlist by repeatedly finding the first video in the playlist and removing it. However, please note that automating actions on websites can sometimes violate the terms of service and may lead to account suspension or other penalties, so use this script at your own risk.