Am 18.04.22 um 14:32 schrieb Andrei Borzenkov:
On Mon, Apr 18, 2022 at 2:47 PM Daniel Bauer
wrote: Hello,
my ~/.cache/thumbnails contains uncountable old files for images that do not exist anymore, so they are there "for nothing".
I know I can delete those folders and they will be rebuilt, but rebuilding will take some time, so I don't want that.
Is there a way to clean-up those directories, only delete the thumbnails for files that do not exist anymore?
Didn't find anything useful in big brother...
Do you know a smart solution?
On a very casual look thumbnails (PNG files) contain property with original filename so you should be able to script this using any tool for querying PNG properties.
tux@localhost:~> identify -verbose .cache/thumbnails/large/3f44c69467eb287ea609416cb96a7ca3.png
Image: Filename: .cache/thumbnails/large/3f44c69467eb287ea609416cb96a7ca3.png Format: PNG (Portable Network Graphics) ... Properties: ... Software: GNOME::ThumbnailFactory Thumb::MTime: 1647638907 Thumb::URI: file:///usr/share/icons/gnome-logo-text.svg
Thank you for the hint, Andrei! I tried some and found that not all have the "Thumb::URI:" entry... Anyway: I have 15 GB of thumbnails and I just tried what will happen i I removed them, so I renamed the folders and rebooted (I had to reboot anyway, logging out and in would probably have been enough). I found that the creation of the missing thumbs is so very fast on that new computer, even in large directories with large image files, that I'll just delete the old thumbnails directories and forget about a selective clean-up... -- Daniel Bauer photographer Basel Málaga https://www.patreon.com/danielbauer https://www.daniel-bauer.com