I have ~/.julia/conda but it’s nearly empty and I don’t know how it even got there. Might move it out of the way and see if anything breaks.
I think /registries is needed for installing julia packages, though you could delete it and re-add it later if you are really stuck. /clones will accumulate over time but probably isn’t necessary.
I have a related question about artifacts. My artifacts folder is 20GB. I have no doubt that some of those are probably from packages I installed to try out once and haven’t used since. Is it possible to do some sort of purge there without repercussions? I did run ] gc and it deleted only a trivial amount.
(UCARMAModels) pkg> gc --all
Active manifest files: 44 found
Active artifact files: 168 found
Active scratchspaces: 7 found
Deleted 39 package installations (40.117 MiB)
Deleted 1 artifact installation (6.348 MiB)
Oof. That is disappointing. I guess the artifacts that didn’t get GC’d must correspond to packages that you actually still have installed in some environment. If you uninstall those packages and then do gc --all, it should remove the artifacts.
I agree that the results you got are kind of underwhelming.
To be fair, I had already run a regular gc not all that long ago. Maybe 2 weeks? But it didn’t do much better than that. I agree that the packages are likely hidden in Project.toml files, but I wonder if some sort of expiration date could be set?
For a start it would be great if there were commands for listing all the “tracked” environments and for “untracking” (some of) them. These features have been discussed ~2 years ago but have never been implemented (please correct me if I’m wrong).
(@tbeason Note that you have 44 Manifests and I bet that you don’t care about some / many of them anymore.)
Last time I wanted to purge my filesystem from unused packages I had the same problem: many environments tracked, which I didn’t really want. Manually editing .julia/logs/manifest_usage.toml helped ]gc to be more efficient.
The artifacts is full of unneeded files. In almost all cases only the shared lib file is needed but it comes with include, .exe, logs, *.a or *.lib, ,gz etc.
They should only come with the needed files.
Thanks! This looks really helpful but…isn’t working for me? I have tried multiple times now but it never seems to remove anything from the active manifests list. In fact even if I select n=none it doesn’t remove any. I will edit manually.
I didn’t claim that package is battle-tested, that’s like the result of a couple of hours of coding out of frustration one night, never touched it again since then.