0
Thanks

A few words of thanks would be greatly appreciated.

Clearing the thumbnail cache on Linux

Linux is one of the most popular open source operating systems, and it is supported by a large online community as well. Linux has many inbuilt features for easy day to day use like storing of thumbnails to load them more easily. However, over time it saves a huge number of thumbnails in the cache which can occupy a lot of memory. One can clear out this cache by creating a custom file with a code to clear out the .png files. This file needs to be executed by using CHMOD +X command. This process is, however, not required in newer versions like Ubuntu 8.10 where the system clears out the cache automatically.



Linux systems also display thumbnails. It always saves these mini images to make them display more quickly.
So it always saves too many thumbnails which take up a lot of space. So this is how we will clear the thumbnails cache:

How do you do it?

  • Create the file /etc/crond.daily/clean_thumbnails: sudo gedit /etc/cron.daily/clean_thumbnails
  • Copy and paste it:


#!/bin/sh  
nice find /home/yourlogin/.thumbnails -name "*.png" -mtime +15 | xargs rm -f 
  • chmod +x /etc/cron.daily/clean_thumbnails will be executable.

Note


This cleaning is no longer necessary with Ubuntu 8.10: The system will purge itself of thumbnails automatically.
The cache is cleared if there is an excess of the maximum age and miniatures or the maximum cache size; This configuration with gconf-editor in:
  • /desktop/gnome/thumbnail_cache/max_size (maximum size cache)
  • /desktop/gnome/thumbnail_cache/max_age (maximum age of a thumbnail)
0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team

Published by . Latest update on by Celia Gatward.

This document, titled "Clearing the thumbnail cache on Linux," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).

0 Comments