# Juliaup - doesn't garbage collect?

**URL:** <https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118>\
**Category:** VS Code\
**Created:** [March 4, 2024, 8:34am UTC](https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118 "2024-03-04T08:34:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 4, 2024, 8:34am UTC](https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118/1 "2024-03-04T08:34:36Z")

</div>

I recently installed Julia v1.10.2 using `juliaup`. Once installed, `juliaup` informed me that it _failed_ to remove Julia v1.10.1, and suggested I should run `juliaup gc` at a later stage.

I checked the directory in question, and found several older versions; my `juliaup` directory looks as follows:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/1/710fc0ae9a4ce24ba0e0b8bb4841369fdc4986ee.png)

- Question: what has gone wrong? What should I do?

Also, when I check the version no. in a VSCode, I’m told:

```julia
julia> VERSION
v"1.10.1"

```

Likewise, in VSCode, when I’m running a Jupyterlab file and click on `Juliareleasechannel`, I’m told I’m in v1.10.1 and not in v1.10.2.

A final question…

- Do I have to re-install all packages for every incremental update in Julia, e.g., going from v1.10.1 to v1.10.2, etc? It seems like that – in the terminal window, I’m in Julia v1.10.2, and there it spends considerable time re-installing packages.

Weirdly enough, in the REPL, I just did `add Plots`, but it seems to install a lot of other packages, too…  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/c/7c430cbab528d0bba94989b3cc64d79f909f7733.png)

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 4, 2024, 8:57am UTC](https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118/2 "2024-03-04T08:57:42Z")

</div>

Weird: after I had run the package manager in the REPL of the _terminal_, closed and re-opened VSCode, _now_ it shows Julia v1.10.2 in release channel, etc. Strange, because I have closed and re-opened VSCode several times after I installed Julia v1.10.2

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [March 8, 2024, 3:00pm UTC](https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118/3 "2024-03-08T15:00:16Z")

</div>

I have a similar issue: juliaup doesn’t seem to remove old versions, and `juliaup gc` has no effect:

```julia
PS C:\Users\dnf> juliaup st
 Default Channel Version Update
----------------------------------------------------
       * beta 1.10.2+0.x64.w64.mingw32
          release 1.10.2+0.x64.w64.mingw32

PS C:\Users\dnf> ls .\.julia\juliaup\

    Directory: C:\Users\dnf\.julia\juliaup

Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 26.02.2024 09:38 julia-1.10.0+0.x64.w64.mingw32
d----- 31.12.2023 14:27 julia-1.10.0-rc1+0.x64.w64.mingw32
d----- 07.03.2024 08:52 julia-1.10.1+0.x64.w64.mingw32
d----- 07.03.2024 08:52 julia-1.10.2+0.x64.w64.mingw32
d----- 03.12.2021 09:37 julia-1.7.0+0~x64
d----- 04.02.2022 20:35 julia-1.7.1+0~x64
d----- 03.03.2023 19:00 julia-1.9.0-beta3+0.x64.w64.mingw32
d----- 05.05.2023 08:50 julia-1.9.0-rc2+0.x64.w64.mingw32
-a---- 25.01.2022 20:02 0 .juliaup-lock
-a---- 08.03.2024 15:54 401 juliaup.json
-a---- 05.03.2024 08:54 46339 versiondb-x86_64-pc-windows-msvc.json

```

This is taking up multiple GB, and I want to be rid of them.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [March 9, 2024, 8:29am UTC](https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118/4 "2024-03-09T08:29:03Z")

</div>

Part of why `juliaup` may fail to delete an install is that a `julia` process is currently running. Rebooting your machine may facilitate garbage collection in case you have rogue or orphaned Julia processes around.

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [March 9, 2024, 10:51am UTC](https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118/5 "2024-03-09T10:51:46Z")

</div>

I restartred my Windows laptop, and ran `>juliaup gc` as the first thing. No success.

Is it safe to use delete the directories _manually_? Or will that mess up Juliaup?

---

<div class="post-metadata">

**Author:** ![mkoculak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkoculak/32/28310_2.png) [@mkoculak](https://discourse.julialang.org/u/mkoculak)\
**Post date:** [March 9, 2024, 11:02am UTC](https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118/6 "2024-03-09T11:02:34Z")

</div>

For me the `juliaup gc` never really worked (Windows), despite rebooting or even waiting for two releases.  
I always manually delete the replaced versions and never had any problems.

But yeah, it would be nice to have it done with a command.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [March 9, 2024, 12:53pm UTC](https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118/7 "2024-03-09T12:53:51Z")

</div>

I’ve rebooted multiple times since 2021, but v1. 7 still hangs around.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [March 9, 2024, 3:18pm UTC](https://discourse.julialang.org/t/juliaup-doesnt-garbage-collect/111118/8 "2024-03-09T15:18:12Z")

</div>

I’m just describing the initial reason why juliaup may have failed to delete an install. I think that may explain what happened here in the end:

> [@BLI](#):
>
> Weird: after I had run the package manager in the REPL of the _terminal_, closed and re-opened VSCode, _now_ it shows Julia v1.10.2 in release channel, etc. Strange, because I have closed and re-opened VSCode several times after I installed Julia v1.10.2
