Clean-up KDE System Thumbnails
This work is licensed under the Creative Commons Attribution Non-Commercial 2.0 UK: England & Wales Licence. This means that you are free to: copy; distribute; and modify this work. It also means that you cannot use it for commercial purposes. Additionally, you must attribute this work to the original author, Thomas Guymer, ideally with a link.
KDE creates thumbnails of all your files when you view them in Konqueror. It then saves these thumbnails so that if you look at the photo again it doesn't have to regenerate the thumbnail. This is a really efficient way of doing things. Plus, it stores the thumbnails in a central place instead of, like Windows, leaving little Thumbs.db files around the place. The drawback with the current system is that if you delete a photo then its thumbnail is not deleted along with it. This means that if you simply rename a folder then a huge swathe of saved thumbnails will no longer refer to the correct files - thus being useless. After a while these accumilate and occupy diskspace when they really shouldn't. To quote the comment in the script:
This script will:
- search for all the saved thumbnails on your KDE system; then
- check if the original file is present and delete the thumbnail if it is not; or
- delete the thumbnail if it references the trash can.
Simply download the script ZIP archive (1.5KB) and extract the single PHP file to somewhere on your computer. Then, to quote the script comment again:
This script can be run in two ways:
- type php systemThumbnails.php into a console window; or
- type ./systemThumbnails.php into a console window.
I hope this script is useful for you. The first time I ran it it removed 90MBs of redundant thumbnails for me!