Cleaning of $XDG_CACHE_HOME and $XDG_CACHE_HOME/thumbnails

Benjamin Berg benjamin at
Wed Feb 26 14:04:14 UTC 2020

On Wed, 2020-02-26 at 10:58 -0300, Soni L. wrote:
> On 2020-02-26 10:39 a.m., Benjamin Berg wrote:
> > [SNIP]
> > I don't think that $XDG_CACHE_HOME is designed to be used directly by
> > users. And if it is an application which generates those repositories,
> > then again, it can just drop-in the appropriate configuration to
> > prevent cleaning.
> > [SNIP]
> > Am I missing something obvious?
> Oh sorry, I should've been more specific. I use it in the program I make 
> > > Besides, what if you nuke it *while* the thing is running? That
> > > doesn't sound like a good idea.
> > 
> > This seems like a rather unlikely corner case. In particular as the
> > atime is taken into account by tmpfiles.d. So there should be no need
> > to worry about files being deleted that have been used in the last 30
> > days or so.
> I believe git won't necessarily touch old object files such as those 
> from really old commits, so that might still break stuff. Unless I'm 
> misunderstanding something here and it's meant to be all-or-nothing.

Right, but in your usecase, all you need to do is create a file (at
installation or startup when running from source) in:
with the single line
  x %C/ganarchy
or something very similar.

Really, all this does make it explicit that you do not want automatic
cache cleaning for the corresponding directory.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the xdg mailing list