If you have had a youtube account for a long time, and before you became privacy conscious, you might want to delete all of your youtube likes and favourites.

I was able to find the following code to delete liked video, which needs to be executed in the console in the liked videos playlist:

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++) { 
        items[i].click(); 
        out = setTimeout(function () { 
            if (document.querySelector('paper-listbox.style-scope.ytd-menu-popup-renderer').lastElementChild) { 
                document.querySelector('paper-listbox.style-scope.ytd-menu-popup-renderer').lastElementChild.click(); 
            } 
        }, 100); 
        await sleep(500); // sleep cause browser can not handle the process 
        clearTimeout(out); 
    } 
} 
 
deleteLikedVideos();

I didn’t find a way to do the same for the favourites, so I came up with my own, which also needs to be run in the console from the favourites videos playlist. You might need to change the text Supprimer de Favoris to what the button in the UI says in your language.

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

async function deleteFavourites() { 
    '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++) { 
        items[i].click(); 
        out = setTimeout(function () { 
            var items2 = document.querySelectorAll('paper-listbox.style-scope.ytd-menu-popup-renderer > ytd-menu-service-item-renderer > paper-item');
            for (var j = 0; j < items2.length; j++){
                if(items2[j].textContent.includes("Supprimer de Favoris")){
                    items2[j].click();
                }
            }
        }, 100); 
        await sleep(200); // sleep cause browser can not handle the process 
        clearTimeout(out); 
    } 
} 

deleteFavourites(); 
@Ordoviz
35M

Thanks for posting! I found a solution on Stack Exchange when I did the same.

Dreeg Ocedam
creator
25M

That’s where the first script (for liked videos) comes from. However it doesn’t work for Favourites, so I had to adapt it (second script).

@jurimasa
15M

I ran this and it started flagging all videos as inappropriate.

@AgreeableLandscape
admin
1
edit-2
5M

Does deleting your entire channel also accomplish this? Actually want to know.

Dreeg Ocedam
creator
35M

I guess that if you actually ask youtube to delete your account, in order to respect the RGPD it has to.

DeGoogle Yourself
!degoogle

    Here you may post anything with the DeGooge movement!!! Enjoy killing Google’s Empire!!

    • 0 users online
    • 1 user / day
    • 6 users / week
    • 23 users / month
    • 91 users / 6 months
    • 1545 subscribers
    • 115 Posts
    • 357 Comments
    • Modlog