Valid XHTML Icon Valid CSS Icon Valid SVG Icon Unicode UTF-8 Icon
Add to del.icio.us Digg this! Post to reddit Share on Facebook Add to StumbleUpon Add to Google Bookmarks

Clean-up KDE System Thumbnails

Creative Commons LogoThis 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:

  1. search for all the saved thumbnails on your KDE system; then
  2. check if the original file is present and delete the thumbnail if it is not; or
  3. 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!

This page was last modified on 27/03/2009. This page has had 1,002 hits up until 01/09/2011.

Available for download:

Amazon.co.uk logoDo you want to say thank you? Visit my Amazon Wishlist, thank you.Amazon dummy image

(from My Portfolio)

© 2002-2012 Thomas Guymer. See the Copyright Statement & the Cookie Policy.