Hacker News new | ask | show | jobs
by ajsnigrutin 1178 days ago
> I can just `rm -rf ~/.cache

But can you? Did you really close all the apps using ~/.cache? What if some app is just doing some cleanup operation, moves a bunch of stuff to cache, and the files are missing now? Did you just delete android studio cache in the middle of a compile?

You can also make a script like your .config, but it's called "clear_cache.sh", where you hardcore a few paths you usually clean manually.

2 comments

Programs that cannot deal with removing ~/.cache at any point are simply faulty because at that point it is state and not cache which by definition can be recreated at the point of access.
That was a bit exaggerated I never clean fully the cache, mostly just specific apps but as long as I have everything closed (GUI and CLI apps), I don't really care what background services are doing and if they get upset because of this. I'm not on a server, that's my laptop so there is no critical stuff going on and once the app I use are closed that's good enough