Cleaning .thumbnails directory

Most desktop applications used under linux are able to display thumbnails of images stored on your PC.

To quicken the display of these images, Linux tend to store them. The problem with these thumbnails is that after sometimes, it occupies a large space causing memory constraint.

Below is a simple method of how to automatically clean up accumulated thumbnails.

Create file /etc/crond.daily/clean_thumbnails: sudo gedit /etc/cron.daily/clean_thumbnails

Paste in :

nice find /home/yourlogin/.thumbnails -name "*.png" -mtime +15 | xargs rm -f 

(Do not forget to replace yourlogin by your login.)

Change status to executable file: chmod +x /etc/cron.daily/clean_thumbnails

Now all thumbnails having a lifetime of more than 15 days will automatically be clean up.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Cleaning .thumbnails directory », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (