Skip to main content
One Hit Wonder
February 5, 2019
Answered

How do you clear all your favourite tracks?

  • February 5, 2019
  • 21 replies
  • 6975 views
I want to delete all my favourite tracks and restart it but don’t know if there is a clear all button somewhere or will I have to physically go through them all?
    Best answer by Joltaic

    I managed to empty my Favorites… Here are the steps for what I did on Firefox:

    1. On the search bar, type "about:config" and accept.
    2. Search "devtools.chrome.enabled" and set it to "True"
    3. On Deezer, go to your Favorite tracks and click on the Checkbox that selects all of the songs. This will load the list of songs you have saved.
    4. Right-click anywhere on the page and select "Inspect".
    5. Go to the Console tab.
    6. Paste the following code:

    // Remove element function
    songRemove = function() {
        Array.from(document.querySelectorAll("button[aria-label='Remove from Favorite tracks']")).slice(0,1).forEach(e => e.click());

        console.log("Song removed from Favorites.");

    }

    // Total tracks to be removed
    track_no = 10000;

    // Song removal loop
    for (let i = 0; i < track_no; i++) {
        setTimeout(songRemove, i * 1500);

    }

     

    1. Where it says "track_no = 10000;" you can change the number to the number of songs you want removed.
    2. Press enter and it will very slowly start removing songs from your favorites list. This will take 250 minutes (over 4 hours). So you might want to do this while you're doing something else or sleeping. There reason for the slow speed is that the songs won´t actually get deleted if you go too fast.

     

    Thank you to Adrian Dymorz for the little snippet of code.

    21 replies

    aelvelis
    Roadie
    Roadie
    May 24, 2026

    I've made a few changes and sped up the code provided by the esteemed snieuwkerk:

    (function () {
    let running = true;
    let removed = 0;
    let errors = 0;
    let startTime = Date.now();

    window.stopRemoveFavorites = function () {
    running = false;
    console.log("Stopped");
    };

    function realClick(el) {
    ["mousedown", "mouseup", "click"].forEach(type => {
    el.dispatchEvent(new MouseEvent(type, {
    bubbles: true,
    cancelable: true,
    view: window
    }));
    });
    }

    function getButton() {
    return Array.from(
    document.querySelectorAll("button[aria-label='Remove from Favourite tracks']")
    ).find(btn => {
    const r = btn.getBoundingClientRect();
    return r.top > 90 && r.bottom < window.innerHeight - 60;
    });
    }

    function logStats() {
    const seconds = Math.max(1, Math.round((Date.now() - startTime) / 1000));
    const speed = Math.round((removed / seconds) * 60);
    console.log(`Removed: ${removed} | Errors: ${errors} | Speed: ${speed}/min`);
    }

    function scrollForMore() {
    window.scrollBy(0, 550);
    console.log("Scrolled");
    }

    function next() {
    if (!running) return;

    if (removed > 0 && removed % 60 === 0) {
    console.log("Cooling down after 60 removals...");
    setTimeout(next, 4000);
    removed++;
    return;
    }

    const btn = getButton();

    if (!btn) {
    scrollForMore();
    setTimeout(next, 1400);
    return;
    }

    realClick(btn);
    removed++;
    logStats();

    setTimeout(next, 650 + Math.random() * 250);
    }

    window.addEventListener("unhandledrejection", event => {
    errors++;
    event.preventDefault();
    console.log("Deezer error ignored. Cooling down...");
    });

    next();
    })();

    The remove speed will be approximately 70–80 songs per minute. You may also see warnings and “errors” in the console, but don't worry—just ignore them, and the deletion will continue on its own.

    Keep in mind that once you have fewer than 1,000 tracks left, you can delete them in bulk without using a script: Click the checkbox in the playlist to select all tracks; three dots will appear next to it—click them and select “Remove from Favorite Tracks,” and that's it. Good luck, everyone.