Ubuntu – Won’t Ubuntu tweak delete the Thumbnail Cache

14.04cacheubuntu-tweak

In Ubuntu tweak 0.8.7 which is installed in my Ubuntu 14.04 LTS running unity I could not delete a particular file called 'fail' in the thumbnail cache. I am actually trying to remove that file with the 'Janitor' feature that is available with Ubuntu tweak. Every time I try deleting that file Ubuntu tweak crashes(i.e. closes). Why does this happen and how to delete it? By the way I could delete every other thumbnail cache file and also other kind of cache except this 'fail' file. Below is a screen shot:-

enter image description here

Best Answer

The ~/.cache/thumbnails/fail directory has somehow been owned by root when you(your user) should have been the owner. Ubuntu tweak crashed because it was trying to delete a file/folder which it is not permitted to and this has probably not been handled in it(might be bug, consider filing if not already filed against ubuntu-tweak).

First change the ownership of the folder by opening a terminal using Alt+F2 and typing "terminal" and then in the opened application, type the following:

sudo chown $USER:$USER ~/.cache/thumbnails/fail -R

and then reopen ubuntu tweak and try to clear the cache again.

Here the first $USER represents you as a user(is an environment variable set on boot and represents the user logged in) and the second one represents your group(the name of your group is same as your username, so can reuse the variable).

Refer to man chown for more.

Related Question