It doesn't seem to delete packages on 1.3?
1.3:
(v1.3) pkg> gc
Active manifests:
`~/JuliaPkgs/PackageCompilerX.jl/Manifest.toml`
....
Active artifacts:
`~/.julia/packages/BinaryBuilder/r6jgA/MutableArtifacts.toml`
....
Deleted no artifacts or packages
1.2 (now it deletes things):
(v1.2) pkg> gc
Active manifests:
`~/JuliaPkgs/PackageCompilerX.jl/Manifest.toml`
...
Deleted `~/.julia/packages/BinaryBuilder/1UGiF` (41.782 MiB)
...
Deleted `~/.julia/packages/Tracker/SAr25` (56.356 KiB)
Deleted 26 package installations (5.503 GiB)
Apparently, this is intended.
To explain, in case anyone else encounters this: Pkg.gc now marks unreachable stuff as "to be deleted" and then deletes it after a month if it has been deletable for that time.
Just ran into this, trying to free disk space. :-)
Would you consider giving gc an option to control this, similar to git gc --prune=now?
Yes, we should have that option for sure. And probably make the delay both configurable and shorter (e.g. a week).
Note that you can do:
using Pkg, Dates
Pkg.gc(;collect_delay=Week(1))
To set the "collect delay" to one week right now. If you want the old "collect immediately" behavior, you can set the time interval to zero in whatever units you like:
using Pkg, Dates
Pkg.gc(;collect_delay=Hour(0))
Most helpful comment
Note that you can do:
To set the "collect delay" to one week right now. If you want the old "collect immediately" behavior, you can set the time interval to zero in whatever units you like: