On 2022-04-19 11:36, Peter McD wrote:
Am 18.04.22 um 20:07 schrieb Daniel Bauer: ...
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?
...
What about the little bash script below, which executes on my computer when logging out from KDE, not only for thumbnails but also for "RecentDocuments" and "docdata"? (Leap 15.3/KDE-Plasma)
Interesting.
Thumbnails sometimes contain confidential date, therefore bigger ones are always removed, smaller ones after 30 days.
#!/bin/bash find ~/.cache/thumbnails/ -type f -size -50k -print -exec rm '{}' \; find ~/.cache/thumbnails/ -type f -mtime +30 -print -exec rm '{}' \;
I have ~2 GB here.
# find ~/.thumbnails/ -mindepth 1 -type f -size -50k -print -exec rm '{}' \; find ~/.thumbnails/ -mindepth 1 -type f -mtime +30 -print -exec rm '{}' \;
I have ~180 MB here.
# find ~/.local/share/RecentDocuments/ -type f -print -exec rm '{}' \; find ~/.local/share/okular/docdata/ -type f -print -exec rm '{}' \; #
This one I want, they are only .desktop files, small. I wonder if there isn't already a tool to purge old "temporary" files like cache or thumbnails. If it doesn't exist, it should. My entire .cache directory has 12 GB. Biggest ones in mozilla, thumbnails and thunderbird. But I do not see old files in a quick check. -- Cheers / Saludos, Carlos E. R. (from 15.3 x86_64 at Telcontar)