# Fully Removing Packages

**URL:** https://discourse.julialang.org/t/fully-removing-packages/31161
**Category:** General Usage
**Created:** [November 16, 2019, 11:06pm UTC](https://discourse.julialang.org/t/fully-removing-packages/31161 "2019-11-16T23:06:26Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Usor](https://avatars.discourse-cdn.com/v4/letter/u/8dc957/32.png) [@Usor](https://discourse.julialang.org/u/Usor)
#### Post date: [November 16, 2019, 11:06pm UTC](https://discourse.julialang.org/t/fully-removing-packages/31161/1 "2019-11-16T23:06:26Z")

</div>

If you remove a package with the builtin package manager, are there any leftover files or directories that you could clean up manually?

Any additional important information also appreciated.

---

<div class="post-metadata">

### Author: ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)
#### Post date: [November 16, 2019, 11:41pm UTC](https://discourse.julialang.org/t/fully-removing-packages/31161/2 "2019-11-16T23:41:53Z")

</div>

Did you try `gc`?

```julia
(v1.whatever)> rm PkgToRm
(v1.whatever)> gc

```

---

<div class="post-metadata">

### Author: ![Usor](https://avatars.discourse-cdn.com/v4/letter/u/8dc957/32.png) [@Usor](https://discourse.julialang.org/u/Usor)
#### Post date: [November 17, 2019, 5:00pm UTC](https://discourse.julialang.org/t/fully-removing-packages/31161/3 "2019-11-17T17:00:18Z")

</div>

Thanks.

No. Can you be clearer and more specific?

What I did do is simply go into the Julia directory (not where Julia itself is installed), where settings and so on are in the user directory, and manually remove what seemed safe to remove.

---

<div class="post-metadata">

### Author: ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)
#### Post date: [November 18, 2019, 10:33am UTC](https://discourse.julialang.org/t/fully-removing-packages/31161/4 "2019-11-18T10:33:55Z")

</div>

One thing to note about the official Julia docs is that the current `Pkg` section is really just a high-level summary of the package manager. If you want lots of detail the `Pkg` [docs on github](https://julialang.github.io/Pkg.jl/v1/) are better. For the package garbage collector function, see [here](https://julialang.github.io/Pkg.jl/v1/api/#Pkg.gc).

In general, removing a package via `rm` does not delete the files from your local `.julia` directory. To do this you also need to run the `Pkg.gc` function (docs linked above), which removes the files for any packages that are detected as being no longer needed.

---

<div class="post-metadata">

### Author: ![colintbowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colintbowers/32/8033_2.png) [@colintbowers](https://discourse.julialang.org/u/colintbowers)
#### Post date: [November 18, 2019, 10:41am UTC](https://discourse.julialang.org/t/fully-removing-packages/31161/5 "2019-11-18T10:41:34Z")

</div>

BTW, sure, you can go into `./julia/packages/` and delete whatever you want to. However, you and the package manager may disagree on what is “leftover” 🙂

In theory, even if you delete something that is still being used, then the package manager should just pull a fresh copy from github the next time the package is called. In practice, if you manually mess around with your package files, or especially with the files in `./julia/environments/` then eventually you’ll probably break something.

---

<div class="post-metadata">

### Author: ![Usor](https://avatars.discourse-cdn.com/v4/letter/u/8dc957/32.png) [@Usor](https://discourse.julialang.org/u/Usor)
#### Post date: [November 24, 2019, 6:08pm UTC](https://discourse.julialang.org/t/fully-removing-packages/31161/6 "2019-11-24T18:08:28Z")

</div>

Thanks for your input. I might have a look at those links.

Yes, I thought that the package manager might disagree with me 🙂

(I saw a message about a dirty something (I forgot the exact message; was already a while ago). I would think at the moment it has to do with it.)
