How to delete everything from your library

So, well, you can’t. Not realisitically.
Of course you can go through your library one-by-one, click on the little black X for each episode and movie, confirm the deletion in each case, wait for all the fancy gui crap to happen, and then do the next one …

Anyway, a little bit of javascript helps a lot here. Visit the following page:
Then open up the javascript console on your browser, and type in the following:
$$('div.remove-library').each(function (e) {$(e).click(); })
You’ll just need to confirm once, then everything on the page will be deleted. (Of course, if you have several pages, you need to do this per page).

Ditto for the TV page:
With script:
$$('div.remove-library').each(function (e) {$(e).click(); })

And for the history page:
Run the following:
$$('div.remove-watched,div.remove-seen').each(function (e) {$(e).click(); })

Granted, the above is not ideal – but it cuts hours of mindless work down to a few mins.

  1. #1 by Alberto on March 23, 2015 - 10:07 pm

    does not seem to work anymore :-(

  2. #2 by Matthew on January 19, 2016 - 4:00 pm

    $(‘.grid-item’).each( function( index) {
    actionWatch($(this), ‘collect’, true)

    This simple jQuery each iterator will remove all items on the page. This works as of 2016 January.

  3. #3 by archy121 on May 11, 2016 - 7:42 am

    Please be kind enough to help remove all movie collection.
    Above methods do not seem to be working.

    From Chrome console:

    ‘window.webkitStorageInfo’ is deprecated. Please use ‘navigator.webkitTemporaryStorage’ or ‘navigator.webkitPersistentStorage’ instead.
    VM633:5’webkitIndexedDB’ is deprecated. Please use ‘indexedDB’ instead.
    $(‘.grid-item’).each( function( index) {
    actionWatch($(this), ‘collect’, true)
    VM835:1 Uncaught SyntaxError: Unexpected token ILLEGAL(…)InjectedScript._evaluateOn @ (program):145InjectedScript._evaluateAndWrap @ (program):137InjectedScript.evaluate @ (program):118
    collection:11 Uncaught TypeError: Cannot read property ‘cmd’ of undefined

  4. #4 by archy121 on May 11, 2016 - 7:47 am

    I forgot to add the new address for library is:

  5. #5 by Arcxk on June 6, 2016 - 2:07 pm

    For anyone who may need this in the future, the text processor for this website replaces the apostrophes in the code with single quotes. The following code from above works find if you paste it into your console then replace every single quote with an apostrophe

    $(‘.grid-item’).each( function( index) {
    actionWatch($(this), ‘collect’, true)

    • #6 by Arcxk on June 6, 2016 - 2:09 pm

      Also note: this only processes one page at a time, although it is significantly faster than manually removing each entry.

  6. #7 by Rootix on July 25, 2016 - 2:52 pm

    With the following version, the next page is loaded directly. You only have to Reapply the script until done:

    $(“.grid-item”).each( function( index) {
    actionWatch($(this), “collect”, true)

    $(“.pagination-top a”)[0].click();

  7. #8 by Renato Laus on August 30, 2016 - 6:36 am

    Still not working.
    I get Uncaught SyntaxError: Invalid or unexpected token … I am a noob so I dont know if I need to enable or do something before.
    I just went to the shows page, opened the javascript console, pasted the script and pressed enter.

    • #9 by furtwangler on November 5, 2016 - 12:31 pm

      As Arcxk said, you have to replace all single quotes with apostrophes in the script (use notepad), copy and paste it into the browser dev console (right click, Inspect in Chrome) and then run it (hit Enter). Refresh the page and do it again until complete. I just verified it’s working.

  8. #10 by Asturias on November 12, 2016 - 5:48 am

    Hy Guys, Very usefull tip.

    I modify the function to reset the Watchlist. I think could be helpfull for someone.

    $(“.list.selected”).each( function( index) { $(this).click() });

    As explain before you have to replace all single quotes with apostrophes.

    • #11 by xIO3Y on November 19, 2016 - 10:07 am

      Unfortunately, I couldn’t get this function to work. Though I did find another way to (fast) reset your watchlist on Trakt.

      Just open your watchlist and click on ‘MANAGE’ so you can move and delete your items with one click. Then just insert following in the console:


      • #12 by bazz on March 15, 2017 - 7:37 am

        This still works

  9. #13 by tipster on June 6, 2017 - 8:58 pm

    window.setTimeout(deleteEm, 10000);

    function deleteEm() {
    console.log(‘Deleting em…’);
    $(‘.posters .grid-item’).each(function(){
    var $this = $(this);
    historyRemove($this, $‘history-id’));
    $(‘.pagination-top a’)[0].click();
    window.setTimeout(deleteEm, 10000);

  10. #14 by tipster on June 6, 2017 - 9:00 pm

    Manually replace single quotes with normal single quotes and that will work ;)

(will not be published)