Disk is full, how to cleanup and how to prevent from filling up again

  • Hi,

    I have a raspberrypi with libreelec.

    The filesystem on /storage is suddenly full.

    Space is taken up by .kodi/userdata:

    # du -scm /storage/.kodi/*

    43 /storage/.kodi/addons

    1 /storage/.kodi/media

    1 /storage/.kodi/system

    55 /storage/.kodi/temp

    852 /storage/.kodi/userdata

    949 total

    Mostly thumbnails.

    Is there any way I can have these thumbnails take up less space? Or maybe have libreelec clean this automatically?

    Lots of stuff stops working when the disk is filled.

    Please advise.

  • is suddenly full.

    Suddenly, eh? ^^

    I don't know what your video/music library looks like, but basically Kodi creates thumbs for every video available. I don't know how Kodi 18's garbage collection will be, but it's possible there are some loose ends on your setup.

    You can try using Milhouse's TextureCache tool and delete some stuff.

    Or use a bigger SD card and create a LibreELEC setup, and copy/move all files manually from the old to the new card..

    Can you also do a df -h output?

  • Please note that this was just after jeg purged the thumbnails.

    I use this to view photos as well as watch videos. So it will get a bunch of thumbnails over time. I would like to automatically clean out old ones or maybe set the thumbnail cache to some max size. E.g. 200MB.

  • Found the old df -h from before cleanup:

  • Viewing photos seems to be a good method to fill up the thumbnails folder / texturecache - and it looks like kodi doesn't automatically garbage collect that.

    I've noticed a similar situation when I last visited my parents, the thumbnails folder was at 1.4GB. They mainly view photos and use TV catchup services (ORF, Arte, ARD/ZDF tvthek addons).

    Running texturecache P brought that down to a much more reasonable ~300MB and the log showed that it was mainly thumbnails from photos and those video streaming addons.

    Milhouse then gave me this additional info about texturecache / thumbnails cleanup:

    • texturecache.py R to remove "orphan" images from Thumbnails (ie. delete artwork from Thumbnails that is not referenced by a row in the Textures13.db database).
    • texturecache.py Xd to remove Textures13.db database rows that reference non-existent Thumbnails artwork.
    • texturecache.py P to "prune" the cache of all artwork which is not referenced by the media library.
    • If you run all three (P, R, Xd) then that's about the best you can do to trim the fat, and fix any inconsistencies.

    I ran all tree options but P was the one that helped the most (R removed some 200 Thumbnails / 5MB total).

    BTW: 1GB storage is a bit small. I'd recommend using a larger partition / SD card

    so long,

    Hias