Can I change where Julia saves Packages?

My Windows .julia folder in my home directory is 7 gigs. I assume that’s where all the Packages are going. Is there any way to have Julia save Packages elsewhere since my small laptop’s SSD is getting full? Even Windows now lets you save apps to a different drive. I have a really big external drive I’d rather save Packages to.

1 Like

https://docs.julialang.org/en/v1/base/constants/#Base.DEPOT_PATH

The first entry is the “user depot” and should be writable by and owned by the current user. The user depot is where: registries are cloned, new package versions are installed, named environments are created and updated, package repos are cloned, newly compiled package image files are saved, log files are written, development packages are checked out by default, and global configuration data is saved. Later entries in the depot path are treated as read-only and are appropriate for registries, packages, etc. installed and managed by system administrators.

DEPOT_PATH is populated based on the JULIA_DEPOT_PATH environment variable if set.

https://docs.julialang.org/en/v1/manual/environment-variables/#JULIA_DEPOT_PATH

4 Likes