On Fri, Sep 26, 2025 at 4:45 AM Jeffrey Walton <[email protected]> wrote: > > On Thu, Sep 25, 2025 at 1:40 PM <[email protected]> wrote: > > > > Andy Smith <[email protected]> wrote: > > > On Thu, Sep 25, 2025 at 09:29:32PM +0530, Avinash Sonawane wrote: > > > > I noticed that there is a directory named ".cache" at root level. It > > > > seems to be created at the time of installation. What is it? > > > > > > It's one of the XDG standard directories. > > > > > > https://specifications.freedesktop.org/basedir-spec/latest/
Really? Could you please quote the exact XDG spec paragraph/line for `/` being a possible value for `$HOME` or `/.cache` being a possible value for `$XDG_CACHE_HOME` as per the standard? > > > > Who has created it? > > > > > > Probably put there as part of user creation but all apps that need to > > > use it will also (re-)create it if you delete it. Cool! Could you please let me know exactly which package needs/uses `/.cache` so that I can report a bug against it? > I was thinking something similar... Sudo or another program scrubbed > the environment. $HOME became empty, so "$HOME/.cache" became > "/.cache". And that's an expected behavior? Not a bug? On Fri, Sep 26, 2025 at 4:45 AM Jeffrey Walton <[email protected]> wrote: > > On Thu, Sep 25, 2025 at 1:40 PM <[email protected]> wrote: > > > > Andy Smith <[email protected]> wrote: > > > On Thu, Sep 25, 2025 at 09:29:32PM +0530, Avinash Sonawane wrote: > > > > I noticed that there is a directory named ".cache" at root level. It > > > > seems to be created at the time of installation. What is it? > > > > > > It's one of the XDG standard directories. > > > > > > https://specifications.freedesktop.org/basedir-spec/latest/ > > > > > > > Who has created it? > > > > > > Probably put there as part of user creation but all apps that need to > > > use it will also (re-)create it if you delete it. > > > > I'm confused. It's part of a user's directories, and defaults to > > $HOME/.cache so surely it should be under /root not under / ? > > > > The OP could test it by setting an explict value for $XDG_CACHE_HOME in > > root's environment and seeing if that makes any difference. > > I was thinking something similar... Sudo or another program scrubbed > the environment. $HOME became empty, so "$HOME/.cache" became > "/.cache". > > > > > Seems to be a bug in some package which has created it... > > > > > > "Everything I don't understand is a bug" > > Words of wisdom. > > Jeff > -- Avinash Sonawane https://www.rootkea.me

