YouTube maintains an automatic playlist on my channel, called "Liked videos", with all the videos I have clicked the thumbs-up button.

For personal reasons, I want to clean up this list. (Deleting my YouTube account is not an option.)

I know I can delete the videos one by one, but that wouldn't fit my December, 2025 deadline. Is there a way (or a user script) to delete them all at once?


Go to the Liked playlist, open a console in the browser and write this:

var items = $('body').getElementsByClassName("pl-video-edit-remove-liked-video"); 
    for(var i = 0; i < items.length; i++){

After this just hit the refresh button.

  • this worked a charm - no need for a bookmarklet since it's not something one does on a daily basis :) – RozzA Jul 6 '17 at 8:25
  • 1
    I did it this way: document.querySelectorAll('.pl-video-edit-options > button').forEach(b => b.click()) since there was a child button for removing videos – solstice333 Sep 21 '18 at 19:48
  • 1
    Unfortunately, this answer is outdated and doesnt work anymore. – phil294 Oct 6 '20 at 21:00

Previous answers did not work so I made a 2019 version. Here is the JavaScript code to make it in just a minute.

function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));

async function deleteLikedVideos() {
    'use strict';
    var items = document.querySelectorAll('ytd-menu-renderer > yt-icon-button.dropdown-trigger > button[aria-label]');
    var out;

    for (var i = 0; i < items.length; i++) {
        out = setTimeout(function () {
            if (document.querySelector('paper-listbox.style-scope.ytd-menu-popup-renderer').lastElementChild) {
        }, 100);
        await sleep(500); // sleep cause browser can not handle the process


Tried it and it works, as it deleted all of my 200+ videos.

  • 1
    Thank you! Removed 900 videos with likes. btw your script does not delete private and deleted videos. – Artem Illarionov Feb 23 '20 at 16:43
  • Works great! But you need to load all entries into view beforehand, because the endless scroll feature of YT playlist view messes this script up. – phil294 Oct 6 '20 at 22:12
  • @ArtemIllarionov yes, but you also cannot delete them manually :-/ – phil294 Oct 6 '20 at 22:12

You can make the list private your privacy settings. I don't think it is possible to automate the process without making some sort of script for it (which I do not have the knowledge to be able to code one).

This might seem mundane, but the easiest way I can see of selectively removing videos from the playlist would be by going to "My Liked Videos" and clicking x on each one. Again, there might be a script that would make this easier, but my knowledge of scripting is extremely limited.


You can use a bookmarklet to remove videos from a playlist. Still, the process will be removing one by one. But at least you don't have to do it and faster than you manually removing it.

function d(){
   var el = document.getElementsByClassName('pl-video-edit-remove');
   if (el.length > 0) {

Copy this code. On your bookmark bar, right-click → New Bookmark → Paste this code into the location. Then go to you "Liked videos" videos page and click on this bookmark. It will start to remove the videos from the bottom to top order.

  • pl-video-edit-remove should now be pl-video-edit-remove-liked-video, they renamed the class. It works better in the browser console (without javascript:) than in a bookmarklet. – comp500 Nov 25 '18 at 16:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.