I ran this command to release disk space on anaconda
$ conda clean --all
However, there are still some big files that remain in pkgs
folder in anaconda python.
Is it safe to manually delete all the files in pkgs
folder? Any risk of corrupting my anaconda environment? What are some side effects, if any?
I am using anaconda 2018 on windows 10.
Actually, under certain conditions it is an option to have the pkgs
subdirs removed. As stated here by Anaconda Community Support "the pkgs
directory is only a cache. You can remove it completely if you want to.
However, when creating new environments, it is more efficient to leave whatever packages are in the cache around."
According to the documentation you can use conda clean --packages
to remove unused packages in pkgs
(which will move them to pkgs/.trash
from which you can then safely delete them). While this does not check for packages installed using symlinks back to the package cache, this is not a topic if you don't use such environments or work under Windows. I guess that's why conda clean --packages
is included in conda clean --all
.
To more aggressively save space you can use conda clean --force-pkgs-dirs
to remove all writable package caches (with the same caveat that there could be environments linked to these dirs). If you don't use environments or use Anaconda under Windows, you're probably safe. Personally, I use this option without issues.