Skip to content

Move ~/.cargo to ~/.cache/cargo? #210

Closed
@SimonSapin

Description

@SimonSapin

I see that Cargo creates a .cargo directory in my home directory, containing git repositories and checkouts of dependencies I use. These files seem "non-essential": if removed, Cargo will just download dependencies again and recreate them.

At least Linux, the best practice here seems to be to follow the XDG Base Directory Specification and have these files in $XDG_CACHE_HOME/cargo, falling back on ~/.cache/cargo if the variable is not set, empty, or not an absolute path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions