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:-
Ubuntu – Won’t Ubuntu tweak delete the Thumbnail Cache
14.04cacheubuntu-tweak
Related Solutions
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.
As I tested Ubuntu Tweak 0.8.6 in Ubuntu 13.10. It seems that for both, late releases of Mozilla Firefox and Thunderbird moved their cache folders to ~/.cache
. Profiles configuration kept in same place ~/.mozilla/firefox/profiles.ini
and ~/.thunderbird/profiles.ini
.
Firefox:
~/.mozilla/firefox/
→~/.cache/mozilla/firefox/
Thunderbird:
~/.thunderbird/
→~/.cache/thunderbird/
Quick patch:
sudo nano /usr/share/pyshared/ubuntutweak/janitor/mozilla_plugin.py
Add/Change all lines I include cache_path
in them (3 new lines, 2 modified app_path
→ cache_path
, keep app_path
of the profiles.ini):
import os
import logging
from ubuntutweak.janitor import JanitorCachePlugin
from ubuntutweak.settings.configsettings import RawConfigSetting
log = logging.getLogger('MozillaCachePlugin')
class MozillaCachePlugin(JanitorCachePlugin):
__category__ = 'application'
targets = ['Cache',
'OfflineCache']
app_path = ''
cache_path = ''
@classmethod
def get_path(cls):
profiles_path = os.path.expanduser('%s/profiles.ini' % cls.app_path)
if os.path.exists(profiles_path):
config = RawConfigSetting(profiles_path)
try:
profile_id = config.get_value('General', 'StartWithLastProfile')
for section in config.sections():
if section.startswith('Profile'):
relative_id = config.get_value(section, 'IsRelative')
if relative_id == profile_id:
return os.path.expanduser('%s/%s' % (cls.cache_path, config.get_value(section, 'Path')))
except Exception, e:
log.error(e)
path = config.get_value('Profile0', 'Path')
if path:
return os.path.expanduser('%s/%s' % (cls.cache_path, path))
return cls.root_path
class FirefoxCachePlugin(MozillaCachePlugin):
__title__ = _('Firefox Cache')
app_path = '~/.mozilla/firefox'
cache_path = '~/.cache/mozilla/firefox'
class ThunderbirdCachePlugin(MozillaCachePlugin):
__title__ = _('Thunderbird Cache')
cache_path = '~/.cache/thunderbird'
app_path = '~/.thunderbird'
I filled an upstream bug report for this, See Cache path of Mozilla Firefox and Thunderbird changed to ~/.cache #24
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:
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.