38

I have a lot of images on my laptop as I work in graphics. On the same system, I also have a folder containing my family pictures.

I would like to do two things:

  • Empty the already cached images

and then

  • "blacklist" or exclude the folder holding the family pictures as I use Shotwell for organizing/adding/deleting these files

In the settings of Nautilus you can only change global settings.

File Management Preferences preview tab

Any ideas?

Allan
  • 11,582

3 Answers3

55

Thumbnails are stored in ~/.cache/thumbnails. Simply deleting everything in there will reset your thumbnails, causing them to be recreated according to the global settings. I'm afraid I can't think of a way to prevent a specific directory from being thumbnailed.

Note: In Ubuntu 12.04 (Precise Pangolin) and older, the thumbnails are stored in ~/.thumbnails. But please verify this for your own distro. Lubuntu 12.10 (a clean install) has its thumbnails in ~/.thumbnails and there is no thumbnails subfolder in ~/.cache.

Scaine
  • 11,139
  • would hidden files or files in a hidden folder be indexed? – Allan Mar 08 '11 at 16:01
  • 2
    The thumbnailer will only start when you browse to the directory in question - it doesn't silently scan your system looking for things to thumbnail. So if you have hidden image/video files, they won't be thumbnailed unless you show them. But if you show them, they'll be thumbnailed! – Scaine Mar 09 '11 at 09:31
  • looks like a Ubuntu brainstorm/ Launchpad feature request :( thanks for the info though – Allan Mar 13 '11 at 22:02
6

BleachBit can wipe your thumbnail cache, I believe. Not sure how to blacklist a folder from getting thumbnails, though.

Jonathan
  • 7,450
0

remove thumbnail if the original file does not exist:

cd ~/.cache/thumbnails
find large normal -type f |
perl -MImage::Magick -MURI::Escape -lne '
    $, = "\t";
    $f = $_;
    $img = Image::Magick->new;
    $img->Read($f);
    $u = $img->Get("%[Thumb::URI]");
    $p = uri_unescape $u;
    $p = substr $p, 7;
    next if -f $p;
    print "rm", $f, $p;
    unlink $f;
'
gholk
  • 21