# How to Clean Julia Directory, Registries, etc After Long Usage?

**URL:** <https://discourse.julialang.org/t/how-to-clean-julia-directory-registries-etc-after-long-usage/87194>\
**Category:** General Usage\
**Tags:** question\
**Created:** [September 13, 2022, 8:49am UTC](https://discourse.julialang.org/t/how-to-clean-julia-directory-registries-etc-after-long-usage/87194 "2022-09-13T08:49:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [September 13, 2022, 8:49am UTC](https://discourse.julialang.org/t/how-to-clean-julia-directory-registries-etc-after-long-usage/87194/1 "2022-09-13T08:49:52Z")

</div>

Hi all, I have been using Julia everyday, I understand why people love Julia lang… #MeToo

Thus, today I want to clean up things, where / which directories to clean? I am using Linux OS. Must be a lot of stacks that can be cleaned to free up more space right? I have installed almost 100 packages already.

**Then:**  
I also have a problem, probably due to plotting a lot of graphs. I can’t plot anymore. Either using pyplot() or gr() as backend the plot window / gui does not comes out, I try with working codes and the window never shown again, but on REPL the codes run.

What to do to fix the plotting GUI/window problem? (I suspect this is due to the plot of step function I tried tremendously yesterday `[x + 1/2]`

The codes run without error or warning but the GUI/window is not showing (attachment below):  
 ![Capture d’écran_2022-09-13_15-43-49](https://global.discourse-cdn.com/julialang/original/3X/7/c/7c7ac40cb8ef195e8318bfac3bacd37b0b3734c1.png)

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 13, 2022, 9:13am UTC](https://discourse.julialang.org/t/how-to-clean-julia-directory-registries-etc-after-long-usage/87194/2 "2022-09-13T09:13:42Z")

</div>

For “cleaning up” things there’s the `]gc` command in the Pkg REPL:

```julia
(jl_auRg37) pkg> ?gc
  gc [-v|--verbose] [--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. Use verbose mode for detailed output.

```

For a more thorough clean maybe look at:

> **[GitHub - giordano/PkgCleanup.jl: Cleanup unused Julia environments and artifacts](https://github.com/giordano/PkgCleanup.jl)**
>
> Cleanup unused Julia environments and artifacts. Contribute to giordano/PkgCleanup.jl development by creating an account on GitHub.

I would encourage you to open a separate thread for plotting issues, which are unrelated to cleaning up Julia related directories - this is helpful for others who find these threads through searches later on.

---

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [September 13, 2022, 10:17am UTC](https://discourse.julialang.org/t/how-to-clean-julia-directory-registries-etc-after-long-usage/87194/3 "2022-09-13T10:17:03Z")

</div>

Alright thanks, I will open a separate thread for plotting problem.
