There is always a time when storage becomes a bit tight. Once the /tmp and downloads directories are clear, what next? Caches! But how to find them? Fortunately, this is a standard that can be used to mark directories as cache-containing: CACHEDIR.TAG. It is not uniformly used, but many tools, such as plocate or pip do place one such file in their cache directories. This is enough to delete a bunch of files without having to worry to much about them. $ sudo locate CACHEDIR.TAG | xargs dirname | sudo xargs -I CCDD find CCDD -mindepth 1 -not -name CACHEDIR.TAG -delete As a very arbitrary way to see how many cache directories are marked as such, here what it looks like on my current system. $ sudo locate CACHEDIR.TAG/data/lineage/.ccache/0/CACHEDIR.TAG/data/lineage/.ccache/1/CACHEDIR.TAG/data/lineage/.ccache/2/CACHEDIR.TAG/data/lineage/.ccache/3/CACHEDIR.TAG/data/lineage/.ccache/4/CACHEDIR.TAG/data/lineage/.ccache/5/CACHEDIR.TAG/data/lineage/.ccache/6/CACHEDIR.TAG/data/lineage/.ccache/7/C…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.