Package dir too large

question
package

#1

I think my Julia package dir is too large. When I tried to copy this directory to another PC, I noticed that the .git directories were taking too long because they contain a large number of files.

In a typical package, the .git sub-directory contains about 90% of the files. Note that I am not talking about the size of the directories in bytes, just the file count. This makes it very hard to copy. Is it possible to reduce the number of files in Julia package’s dir? I mean, the .git dirs only contain source control stuff, which is not needed for the package to work, right?

Is it safe to delete the .git directories?


#2

You should safely be able to delete anything in .cache, as that should get re-populated if it isn’t present. But removing the other .git directories would prevent Pkg from ever being able to tell what versions are in use or updating them again. If you only ever want to use a fixed version and don’t care about Pkg being able to work with them again, then a better option would be copying the packages, without .git directories, into a location on LOAD_PATH. Pkg won’t manage them any more but you can still load them with using.


#3

.cache is not inside .git. It doesn’t has as many files, so I don’t think it is a problem.