3

I'm about to back up some parts of my filesystem, including my home directory. I'm looking at $HOME/.cache, and wondering what I should do with it. I know that it's safe to just delete it altogether, but I also notice that most of the space is taken up by the web browser cache. So - of course not deleting caches meaning less time to recreate them, but is there some significant benefit which might make it worth it to keep some of the subdirectories of $HOME/.cache and just delete the browser cache (chromium and mozilla in my case)?

1

Two benefits come to mind (which, to me, aren't that compelling — I don't back it up):

  1. If you back up everything, then you have everything. Even if the program's author thinks your critical data is actually ephemeral, easily recreated, cached data. Or, when you're doing backups for other people, if the user thought ~/.cache was a great place to store his cache of essential documents.

  2. It takes time to recreate cached data, that's why it's saved in the first place. So by backing it up, you're avoiding having to wait for it to be re-generated (or redownloaded, etc.)

There are of course a bunch of obvious drawbacks (backup size, backup time), some less obvious ones (privacy), and some gotchas (programs that presume that an image is updated, then the cached thumbnail is generated—always in that order. Not that a backup program restored a newer cached thumbnail than the image...)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.