# Ok to nuke the Pkg .cache directory?

**URL:** <https://discourse.julialang.org/t/ok-to-nuke-the-pkg-cache-directory/10805>\
**Category:** General Usage\
**Created:** [May 9, 2018, 7:58pm UTC](https://discourse.julialang.org/t/ok-to-nuke-the-pkg-cache-directory/10805 "2018-05-09T19:58:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rsrock/32/115_2.png) [@rsrock](https://discourse.julialang.org/u/rsrock)\
**Post date:** [May 9, 2018, 7:58pm UTC](https://discourse.julialang.org/t/ok-to-nuke-the-pkg-cache-directory/10805/1 "2018-05-09T19:58:33Z")

</div>

I’ve exceeded my quota on a cluster, for the number of files allowed in my shared group directory.

I noticed from the Package docs that all installed packages are downloaded into `.cache/` within Pkg.dir. Is there any harm in nuking this periodically? And will it get filled up behind my back, outside of `Pkg.add()` calls?

This is using Pkg2, on Julia 0.6.

---

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [May 10, 2018, 1:11am UTC](https://discourse.julialang.org/t/ok-to-nuke-the-pkg-cache-directory/10805/2 "2018-05-10T01:11:44Z")

</div>

Check this out. Might have used the word `nuclear`, too 😛

> [@How do you clear cache from a \_\_precompile\_\_()?](https://discourse.julialang.org/t/how-do-you-clear-cache-from-a-precompile/7821/3):
>
> Just thought I’d put the nuclear option here too: map(x-\>map(rm, Base.find\_all\_in\_cache\_path(Symbol(x))), keys(Pkg.installed()))

---

<div class="post-metadata">

**Author:** ![rsrock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rsrock/32/115_2.png) [@rsrock](https://discourse.julialang.org/u/rsrock)\
**Post date:** [May 10, 2018, 3:17am UTC](https://discourse.julialang.org/t/ok-to-nuke-the-pkg-cache-directory/10805/3 "2018-05-10T03:17:02Z")

</div>

Ah, but that’s the precompile cache, in `.julia/lib`. I’m talking about the stuff in `.julia/.cache`.

But I like your approach. Remember, always nuke it from orbit, it’s the only way to be sure.
