What does .cache do? It consumes a huge disk space
In my .cache
folder, in Kubuntu, there are files from Chromium (internet browser), VLC (media player) and files from apt
(package updates).
I've just deleted them, and tried to use Chromium, VLC and apt-get
. They all "seem" to work.
P.S. This is far from a good answer, a good answer should give an explanation why is there default .cache folder and when and how it should be deleted.
P.P.S. If you are thinking of just deleting it, make sure to check which programs are using it, and restart them.
It’s a very old question, but I guess a more descriptive answer should go here.
From the Spec:
$XDG_CACHE_HOME
defines the base directory relative to which user specific non-essential data files should be stored. If$XDG_CACHE_HOME
is either not set or empty, a default equal to$HOME/.cache
should be used.
So unless some running software is actively using this directory (e.g. most browsers store their cache, and some software store video/picture thumbnails here, too), it is generally safe to remove it. Before you do so, you may want to check its contents; the sub-directory names will show you which programs store their data there.
Since no one else has pointed this out, I think it might be good to note that "a cache" by definition is a 2nd copy of data existing elsewhere, and that 2nd copy is kept in the cache to help speed up access to this data.
For example with a web browser, the images, css files, etc. once downloaded are cashed if there is any chance they might be needed again. If they are missing from the cache, then the browser issues a http get and they are reloaded from the Internet. The browser checks only the modification time of the item, and if what is in the cache is the same as on the Internet it isn't downloaded again, but is rather just pulled out of the cache. (And if what's on the Internet is newer, then it's downloaded and the cache is updated.)
Therefore, at least in the case of a browser's cache, the cache information can be deleted at any point in time that the browser isn't running. The side effect is the next time you reload a web page it might take longer to display.
The apt cache is similar, to the best of my knowledge.
My system ubuntu 14.04. I would use 2 step procedure. I would first rename it say xxxcache. Then I try to use the progs that use .cache. Most likely they will create new .cache and put the recently info in it. In other words, they should all work, but they will not remember the past. I have no time to test it, but this what I would do. If something really does not work say chrome, or eclipse I would change xxxcache back. On my ubuntu there is about 30 progs that are using .cache. IMHO