Cleaning of $XDG_CACHE_HOME and $XDG_CACHE_HOME/thumbnails

Soni L. fakedme+xdg at gmail.com
Wed Feb 26 13:25:27 UTC 2020


I use XDG_CACHE_HOME to store git repos. While it's definitely possible 
to nuke them to save space... it'll just re-fetch everything next time 
it runs.

Besides, what if you nuke it *while* the thing is running? That doesn't 
sound like a good idea.

On 2020-02-26 9:45 a.m., Benjamin Berg wrote:
> Hi,
>
> so I looked at gsd-housekeeping the other day. With systemd-tempfiles,
> it only has two purposes these days:
>
>   1. Cleaning $XDG_CACHE_HOME/thumbnails after 30 days
>   2. Cleaning the trash directories after a configurable time
>
> Currently it also tries to clean /tmp and /var/tmp, but doing so is
> really dangerous compared to just leaving it up to systemd-tempfiles (I
> have filed an MR to disable the logic if we are systemd booted).
>
>
> Now, systemd-tempfiles can already clean up everything except for the
> trash. And considering that $XDG_CACHE_HOME is non-essential by
> definition, I think it might be sane to use systemd-tempfiles not only
> to clean the thumbnails but the entirety of $XDG_CACHE_HOME in the
> future. So I am thinking that we could do the following:
>
>     1. Specify that we use the systemd tmpfiles.d configuration format for
>        cleaning $XDG_CACHE_HOME. Also specify that $XDG_CACHE_HOME will be
>        cleaned automatically after e.g. 30 days unless otherwise configured
>        by an application.
>     2. Add some reference to this to the thumbnail specification.
>     3. Tell application maintainers that they need to ship a configuration
>        if they want to keep files longer (likely candidates are e.g. email
>        clients).
>     4. As a start, add a "xdg-thumbnails.conf" systemd-tempfiles
>        configuration to systemd that cleans $XDG_CACHE_HOME/thumbnails
>        after 30 days.
>     5. After a grace period, add "xdg-cache.conf" to clean $XDG_CACHE_HOME
>        and remove "xdg-thumbnails.conf" again (similar to how
>        /usr/lib/tmpfiles.d/tmp.conf does it for /var/tmp and /tmp)
>
> Is it reasonable to standardise on the systemd tmpfiles.d format?
> Is it OK to clean $XDG_CACHE_HOME after a fixed time period by default?
> Other thoughts?
>
> Benjamin
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/xdg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/xdg/attachments/20200226/a6a2c7be/attachment.htm>


More information about the xdg mailing list