# Managing local package and artifacts repository

**URL:** <https://discourse.julialang.org/t/managing-local-package-and-artifacts-repository/62922>\
**Category:** New to Julia\
**Created:** [June 15, 2021, 12:22am UTC](https://discourse.julialang.org/t/managing-local-package-and-artifacts-repository/62922 "2021-06-15T00:22:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hros](https://avatars.discourse-cdn.com/v4/letter/h/97f17d/32.png) [@hros](https://discourse.julialang.org/u/hros)\
**Post date:** [June 15, 2021, 12:22am UTC](https://discourse.julialang.org/t/managing-local-package-and-artifacts-repository/62922/1 "2021-06-15T00:22:05Z")

</div>

I recently found out that my `~/.julia` package was taking about 20GB

I deleted the directory, and started afresh

Are there any “best usage” tips for maintaining a lean `~/.julia` directory?

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [June 15, 2021, 1:24am UTC](https://discourse.julialang.org/t/managing-local-package-and-artifacts-repository/62922/2 "2021-06-15T01:24:05Z")

</div>

This was discussed recently. Try using the gc function in Pkg  
As I recall that thread said that gc did not work as efficiently as expected.

help?\> ? Pkg.gc  
Pkg.gc()

Garbage collect packages that are no longer reachable from any project. Only packages that are tracked by version  
are deleted, so no packages that might contain local changes are touched.

---

<div class="post-metadata">

**Author:** ![hros](https://avatars.discourse-cdn.com/v4/letter/h/97f17d/32.png) [@hros](https://discourse.julialang.org/u/hros)\
**Post date:** [June 17, 2021, 7:58am UTC](https://discourse.julialang.org/t/managing-local-package-and-artifacts-repository/62922/3 "2021-06-17T07:58:28Z")

</div>

thanks  
I am aware of `gc`, but it did not reduce the size of the .julia directory. I had a large number of files in the artifacts subdirectory which `gc` did not remove  
For example, when I build a package with `BinaryBuilder` in a project directory and perform `activate .` to make sure that everything is installed in the context of this project/directory, and I later want to discard that project - deleting the directory has no effect on the artifacts that are stored in `~/.julia`.  
What is the proper way to signal to the package manager that a project is deleted and that its related files can be freed?
