I recall reading somewhere that ]gc is conservative and only remove packages that haven’t been used in the last 1 month.
My question how do I do it more aggressively so that I can remove a package that is no longer required regardless of when it was last used?
The use-case is in build docker images. I have built a docker image by using PackageCompilerX.jl to compile some packages but now I don’t require PackageCompilerX any more so I
]rm PackageCompilerX
]gc
but then ]gc doesn’t seem to do much. Hopefully, this makes it much more googlable.
(@v1.4) pkg> ?gc
gc [--all]
Free disk space by garbage collecting packages not used for a significant time. The
--all option will garbage collect all packages which can not be immediately reached
from any existing project.