How to free space in .julia

I have 28.6 Gb in .julia. What is the best way to free some space?


Maybe try
import Pkg;Pkg.gc()

Maybe I am doing something wrong because the result is the same.

import Pkg;Pkg.gc()
      Active manifest files: 50 found
      Active artifact files: 299 found
      Active scratchspaces: 36 found
     Deleted no artifacts, repos, packages or scratchspaces

Just delete the entire folder and start fresh! Redoing an ] instantiate on a project file or two used to take hours but now is extremely fast.

1 Like

If it is just packages deleting is fine, I think, but also temporary notebooks are stored in that folder.
Maybe check what is really using the disk space.

Please don’t recommend that without any preface! You might have a lot of dev’ed packages you modified in .julia or Pluto also saves notebooks there, so don’t just delete it unless you are 100% sure there isn’t any data you care about in there!



import Pkg, Dates

50 active manifests? Maybe you want to clean them up: GitHub - giordano/PkgCleanup.jl


Hmm, I have 62… never thought about this. Just to make sure I understand - active manifest just means that the manifest has been activated at some point in the past (my manifest_usage.toml file has entries that are as old as my laptop) and any package mentioned in any of these manifests will not get removed by ]gc --all?

On the other hand, deleting entries manually from manifest_usage.toml will allow those packages to be gc’ed, but will not remove the Manifest.toml file itself, meaning I can (and have to) to ]instantiate if I do use one of those old projects again?

My Julia installation has 7 Gb, but almost 4 Gb are conda (required for SymPy.jl). Maybe it’s something to check as well.

1 Like

In my case 4.8 Gb for conda.

Ah sorry, didn’t know about Pluto. Yes, if you dev into that rather than cloning and locally doing it then those are an issue as well.

1 Like

Correct. You may want to “deactivate” environments you don’t use very often, so as to let Pkg.gc clean the packages/artifacts used by them. If you do so, the next time you activate them you’ll have make sure to run ]instantiate, yes. But if you don’t use those environment very often, the next occasion may be in a long time.


I had no idea that’s how it worked - just removed about 4GB of package installations and artefacts related to those 62 active manifests, thank you!

A related question while we’re at it: what’s a scratchspace?

1 Like