how to stop saving thumbnails in ~/.thumbnails

File manager keeps thumbnails in ~/.thumbnails even after the original photo is deleted.

It's really annoying and I feel like it's insecure if some one can see a photo that I've deleted. I want this folder to be clear. I don't mind if it takes time to show thumbnails of photos. How can I stop thumbnails being saved?

1

3 Answers

Requires root permissions

I solved this using tmpfs. The thumbnails remain in RAM until the next reboot and are recreated if needed again. Following two lines in /etc/fstab create tmpfs for both thumbnails directories:

none /home/username/.thumbnails tmpfs rw,noexec,nosuid,size=10%,uid=1000,gid=1000,mode=0755 0 0
none /home/username/.cache/thumbnails tmpfs rw,noexec,nosuid,size=10%,uid=1000,gid=1000,mode=0755 0 0

Replace username with your user name and 1000 with your UID and GID. (You can find these by executing the id in shell).

Now clear the directories and mount tmpfs to them.

rm -rf /home/username/.thumbnails/*
sudo mount /home/username/.thumbnails
rm -rf /home/username/.cache/thumbnails/*
sudo mount /home/username/.cache/thumbnails
2

Open file manager (Nautilus), then Edit > Preferences, and a small window will open like this:

Nautilus file manager

Set show thumbnails to never

After this delete all files in the ~/.thumbnails folder to make sure that all thumbnails are deleted and never created again

2

It's very easy, make thumbnails folder as readable only. You can do it only by sudo. You will have your thumbs in RAM only!

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like