1 Like
Sorry to revive this old thread, but I thought my experience may be useful to others trying to clear up some space in their .julia
directory, especially those who have used Julia on the same machine over the course of many years and across many Julia versions.
My .julia
. directory was ~30GB, with the space mostly taken up by the artifacts
directory. Using gc
cleared minimal memory.
Using this I discovered that I had many environment manifests for old versions of Julia, going back all the way to v1.3
.
[I] caleb@caleb-thinkpad ~/.j/environments> ls -la
total 44K
drwxr-xr-x 2 caleb caleb 4.0K Dec 31 01:50 v1.10/
drwxr-xr-x 2 caleb caleb 4.0K Mar 4 2020 v1.3/
drwxr-xr-x 2 caleb caleb 4.0K Mar 31 2020 v1.4/
drwxr-xr-x 2 caleb caleb 4.0K Aug 19 2020 v1.5/
drwxr-xr-x 2 caleb caleb 4.0K Nov 14 2020 v1.6/
drwxr-xr-x 2 caleb caleb 4.0K May 12 2021 v1.7/
drwxr-xr-x 2 caleb caleb 4.0K Aug 30 2021 v1.8/
drwxr-xr-x 2 caleb caleb 4.0K Jan 12 19:59 v1.9/
I cleared out the environments I no longer use
[I] caleb@caleb-thinkpad ~/.j/environments> rm -rf v1.3 v1.4 v1.5 v1.6 v1.8
And the subsequent gc
removed ~15GB of unused artifacts:
(@v1.9) pkg> gc --verbose --all
...
Deleted 349 package installations (448.348 MiB)
Deleted 2 repos (116.330 KiB)
Deleted 107 artifact installations (14.496 GiB)
Deleted 2 scratchspaces (10.392 KiB)
4 Likes