# Cleaning up old versions

**URL:** <https://discourse.julialang.org/t/cleaning-up-old-versions/44215>\
**Category:** General Usage\
**Created:** [August 3, 2020, 8:17pm UTC](https://discourse.julialang.org/t/cleaning-up-old-versions/44215 "2020-08-03T20:17:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![raoulg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raoulg/32/16978_2.png) [@raoulg](https://discourse.julialang.org/u/raoulg)\
**Post date:** [August 3, 2020, 8:17pm UTC](https://discourse.julialang.org/t/cleaning-up-old-versions/44215/1 "2020-08-03T20:17:40Z")

</div>

I’m kind of new to Julia and just updated to version 1.5  
I noticed that my packages need to be reinstalled (eg ] add Plots).  
If I go to ~/.julia, there is almost 2GBs of data, mainly in ~/.julia/conda and ~/.julia/packages. If I would want to start from a clean slate with version 1.5, how do I do that properly?

Should I just remove the complete ~/.julia folder and reinstall? Or is there a more sophisticated way of removing older versions?

---

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [August 3, 2020, 8:42pm UTC](https://discourse.julialang.org/t/cleaning-up-old-versions/44215/2 "2020-08-03T20:42:31Z")

</div>

You can just remove `.julia` from your user directory and start Julia REPL again. It’ll start “from the clean state”.

If you want to get all your packages in v1.5, first copy `.julia/environments/<oldversion>` to `.julia/environments/v1.5`.

---

<div class="post-metadata">

**Author:** ![raoulg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raoulg/32/16978_2.png) [@raoulg](https://discourse.julialang.org/u/raoulg)\
**Post date:** [August 3, 2020, 8:50pm UTC](https://discourse.julialang.org/t/cleaning-up-old-versions/44215/3 "2020-08-03T20:50:45Z")

</div>

Thanks. So, more general: if I remove `.julia` and put back a version of a `Manifest.toml` and `Project.toml` (could be that of v1.4, but maybe also a backup of my current v1.5, or even another project), all those packages listed there will be reinstalled?

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [August 3, 2020, 11:26pm UTC](https://discourse.julialang.org/t/cleaning-up-old-versions/44215/5 "2020-08-03T23:26:10Z")

</div>

Normally it is sufficient (and safer, with less risk of version conflicts) if you only copy the `Project.toml` file and run `]instantiate`. That way you let the package manager guess what are the suitable versions of the added packages that have not been pinned, and of the indirect dependencies.

If you also keep the `Manifest.toml` file, you are telling the package manager to use exactly the same versions of all (direct and indirect) dependencies. This is recommended for reproducibility, but if you are already changing the Julia versions, you may encounter changes anyway, and the exact set of package versions used in 1.4 may work, or may not work.
