# Windows - a moan about deleting Julia

**URL:** https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726
**Category:** Offtopic
**Tags:** windows, juliaup
**Created:** [February 3, 2022, 12:53pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726 "2022-02-03T12:53:38Z")
**Posts on this page:** 17
**Page:** 1

<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: [February 3, 2022, 12:53pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/1 "2022-02-03T12:53:38Z")

</div>

On Windows 10 my .julia folder has over 18Gbytes of space used.  
There are hundreds of thousands of files under .julia Running Pkg.gc has no effect on the number of files.  
I decided to uninstall Julia (I use juliaup) then delete the .julia directory

MOAN - Windows runs a graphical file browser which displays endless useless information about deleted files. I am emptying my Recycle Bin and it is deleting 180 files per second - why oh why can it just not delete lots of files quickly?

One other small thing - should there be a remove / uninstall method in juliaup ?

---

<div class="post-metadata">

### Author: ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)
#### Post date: [February 3, 2022, 1:11pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/2 "2022-02-03T13:11:36Z")

</div>

I nearly always use Shift-Del for file and folder deletion.  
The RecycleBin stays empty and clean always 😉 which I like.

Well, the deletion process still has the graphical visuals but its not a major time issue for me (ssd?) even for much larger data. This depends on hardware and file system.

(A proper backup strategy is always obligatory!!! Not only because deleting with shift-del in this case.)

---

<div class="post-metadata">

### Author: ![Jeff\_Emanuel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff_emanuel/32/15440_2.png) [@Jeff\_Emanuel](https://discourse.julialang.org/u/Jeff_Emanuel)
#### Post date: [February 3, 2022, 8:35pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/3 "2022-02-03T20:35:42Z")

</div>

Windows command line: “Removes (deletes) a directory.” `rd /s /q`

---

<div class="post-metadata">

### Author: ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)
#### Post date: [February 3, 2022, 9:46pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/4 "2022-02-03T21:46:14Z")

</div>

> [@johnh](#):
>
> One other small thing - should there be a remove / uninstall method in juliaup ?

FWIW, on linux / macos there is `juliaup self uninstall`.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [February 3, 2022, 10:11pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/5 "2022-02-03T22:11:15Z")

</div>

> [@johnh](#):
>
> my .julia folder has over 18Gbytes of space used.

That is the source of this issue

---

<div class="post-metadata">

### Author: ![goerch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerch/32/29122_2.png) [@goerch](https://discourse.julialang.org/u/goerch)
#### Post date: [February 3, 2022, 10:17pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/6 "2022-02-03T22:17:06Z")

</div>

> [@johnh](#):
>
> On Windows 10 my .julia folder has over 18Gbytes of space used.

That seems slightly excessive. You can find tools like [this](https://windirstat.net/) which report where the space is spent. This would probably be interesting for others as well.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [February 3, 2022, 10:38pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/7 "2022-02-03T22:38:11Z")

</div>

Not difficult to guess where space is spent. I referred to it before, the artifacts come with an excessive bloat of needless files (headers, (large) static libs, etc).

---

<div class="post-metadata">

### Author: ![goerch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerch/32/29122_2.png) [@goerch](https://discourse.julialang.org/u/goerch)
#### Post date: [February 3, 2022, 10:39pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/8 "2022-02-03T22:39:24Z")

</div>

> [@joa-quim](#):
>
> Not difficult to guess where space is spent. I referred to it before, the artifacts come with an excessive bloat of needless files (headers, (large) static libs, etc).

But there might be certain packages which exhibit this behavior and could be optimized?

Just for reference: my `.julia` contains around 1 GB of data.

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [February 3, 2022, 10:40pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/9 "2022-02-03T22:40:15Z")

</div>

All?

---

<div class="post-metadata">

### Author: ![goerch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerch/32/29122_2.png) [@goerch](https://discourse.julialang.org/u/goerch)
#### Post date: [February 3, 2022, 10:51pm UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/10 "2022-02-03T22:51:00Z")

</div>

Sorry, I only looked into `.julia.packages`, `.julia` is around 10 GB for me, too.

Worst offenders here: `conda` with 3 GB, `compiled` with 2.2 GB, `MKL`’s in `artifacts` (around 600 MB for each version) followed by `Enzyme` in artifacts (around 300 MB for each version) followed by `Mosek` in packages (around 200 MB).

---

<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: [February 4, 2022, 5:33am UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/11 "2022-02-04T05:33:25Z")

</div>

Is this after `] gc --all`?

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [February 4, 2022, 6:22am UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/12 "2022-02-04T06:22:25Z")

</div>

Linking related thread on [Julia and Pkg clean up.](https://discourse.julialang.org/t/packages-clean-up-general-julia-data-consumption/56198)

---

<div class="post-metadata">

### Author: ![goerch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goerch/32/29122_2.png) [@goerch](https://discourse.julialang.org/u/goerch)
#### Post date: [February 4, 2022, 9:04am UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/13 "2022-02-04T09:04:44Z")

</div>

> [@nilshg](#):
>
> s this after `] gc --all`

I just did `gc --all` and this reduced the load by around 500 MB.

---

<div class="post-metadata">

### Author: ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)
#### Post date: [February 4, 2022, 9:58am UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/14 "2022-02-04T09:58:52Z")

</div>

This isn’t related to OP.  
This is about Windows and deleting large folders with many files and a not helpful visualization of this deletion process. That’s why we are in Offtopic.

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [February 4, 2022, 10:03am UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/15 "2022-02-04T10:03:33Z")

</div>

I thought one of the reasons OP decided to remove Julia was (quote):

> [@johnh](#):
>
> .julia folder has over 18 Gbytes of space used

---

<div class="post-metadata">

### Author: ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)
#### Post date: [February 4, 2022, 10:24am UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/16 "2022-02-04T10:24:37Z")

</div>

Seems so and

> [@johnh](#):
>
> Running Pkg.gc has no effect on the number of files

.julia can grow large, and if you are very active it will stay large even after gc.  
I don’t think this is a problem, it’s just a sign of quite some number of great packages.

Removing .julia completely and creating it new from scratch is a viable option if you want to make free space. You even don’t need to reinstall Julia itself. Just run Julia after deletion and .julia will be created new and clean.  
(You have to be careful for ./dev folder, you may loose development changes)

So far so good.

Deleting a large folder with many files can be a pain in Windows (and e.g. on a NFS mounted file system).

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [February 4, 2022, 10:43am UTC](https://discourse.julialang.org/t/windows-a-moan-about-deleting-julia/75726/17 "2022-02-04T10:43:35Z")

</div>

> [@oheil](#):
>
> Deleting a large folder with many files can be a pain in Windows

Fyi, the suggested `large Windows folder deletion` method [given here](https://superuser.com/a/289399), is simple and seems to further optimize @Jeff_Emanuel’s recommendation above.
