# \`pkg\> rm Proj\` doesn't delete the project folder

**URL:** <https://discourse.julialang.org/t/pkg-rm-proj-doesnt-delete-the-project-folder/13508>\
**Category:** General Usage\
**Created:** [August 15, 2018, 3:18pm UTC](https://discourse.julialang.org/t/pkg-rm-proj-doesnt-delete-the-project-folder/13508 "2018-08-15T15:18:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarloLucibello](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carlolucibello/32/3278_2.png) [@CarloLucibello](https://discourse.julialang.org/u/CarloLucibello)\
**Post date:** [August 15, 2018, 3:18pm UTC](https://discourse.julialang.org/t/pkg-rm-proj-doesnt-delete-the-project-folder/13508/1 "2018-08-15T15:18:08Z")

</div>

as an example, after

```julia
pkg> rm ExtractMacro

```

I was expecting the folder `.julia/packages/ExtractMacro/Wcrs/` or `.julia/packages/ExtractMacro/` to disappear, but it didn’t.  
Assuming this is intentional behavior I wonder why?

---

<div class="post-metadata">

**Author:** ![adamslc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adamslc/32/3452_2.png) [@adamslc](https://discourse.julialang.org/u/adamslc)\
**Post date:** [August 15, 2018, 3:27pm UTC](https://discourse.julialang.org/t/pkg-rm-proj-doesnt-delete-the-project-folder/13508/2 "2018-08-15T15:27:03Z")

</div>

That command removes `ExtractMacro` from the current environment, but other environments on your system might still need `ExtractMacro`, so the folder isn’t deleted.

If you want to clean up any packages that aren’t used by any environment, you can **garbage collect** by typing

```julia
pkg> gc

```

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [August 15, 2018, 3:31pm UTC](https://discourse.julialang.org/t/pkg-rm-proj-doesnt-delete-the-project-folder/13508/3 "2018-08-15T15:31:50Z")

</div>

> [@CarloLucibello](#):
>
> Assuming this is intentional behavior I wonder why?

> [@adamslc](#):
>
> other environments on your system might still need `ExtractMacro` , so the folder isn’t deleted.

That, and also that there is no need to download it again next time you add the same version of the package.

---

<div class="post-metadata">

**Author:** ![CarloLucibello](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carlolucibello/32/3278_2.png) [@CarloLucibello](https://discourse.julialang.org/u/CarloLucibello)\
**Post date:** [August 16, 2018, 3:20am UTC](https://discourse.julialang.org/t/pkg-rm-proj-doesnt-delete-the-project-folder/13508/4 "2018-08-16T03:20:14Z")

</div>

I will have to keep in mind to run `pkg> gc` every now and then. I just did it, after a few weeks on 0.7, and it has freed up almost 1 Gb

```julia
   Deleted 300 package installations : 836.488 MiB

```

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [August 16, 2018, 4:08am UTC](https://discourse.julialang.org/t/pkg-rm-proj-doesnt-delete-the-project-folder/13508/5 "2018-08-16T04:08:39Z")

</div>

We’ll add automatic garbage collection at some point but we will probably want to be a little careful about it.

---

<div class="post-metadata">

**Author:** ![Nosferican](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nosferican/32/9275_2.png) [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Post date:** [August 16, 2018, 5:15am UTC](https://discourse.julialang.org/t/pkg-rm-proj-doesnt-delete-the-project-folder/13508/6 "2018-08-16T05:15:58Z")

</div>

Might be nice to ignore `.DS_Store` for Mac OS since otherwise it will fail at

```julia
ERROR: SystemError: unable to read directory /Users/name/.julia/packages/.DS_Store: Not a directory

```

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 16, 2018, 7:22am UTC](https://discourse.julialang.org/t/pkg-rm-proj-doesnt-delete-the-project-folder/13508/7 "2018-08-16T07:22:58Z")

</div>

This is fixed on master of Pkg, will be in next julia bugfix release
