Christoffer
Christoffer

Reputation: 2411

Anaconda installs duplicate libraries

I am new to using Anaconda and as my hard drive is filling up I realized there are multiple (large) files that exist as duplicates in the following directories:

/anaconda3/pkgs/.../lib/<file>
/anaconda3/lib/<file>

Example of a file that is duplicated is libmklml.dylib. In addition there are duplicate files such as:

tensorflow-base-1.13.1-mkl_py36hc36dc97_0.tar.bz2
tensorflow-base-1.13.1-mkl_py37h66b1bf0_0.tar.bz2

in the same directory.

My guess is that the /pkgs/ folders is the file as it was downloaded and the anaconda/lib/ directory is where the libraries are being executed. I am puzzled though why there are duplicate versions of each file.

Can I remove any of them, and if so, how? I tried conda clean -p (as well as conda clean -a) which seems to have removed about 1.5 Gb of files but not these type of duplicates.

Upvotes: 2

Views: 2299

Answers (2)

cosine
cosine

Reputation: 31

On linux there is a tool fslint-gui, that finds duplicate files and can then replace the duplicates with a symlink.

Not sure how stable that is when certain packages are updated.

Upvotes: 0

LambdaG
LambdaG

Reputation: 148

conda clean -a is enough for routinely cleanup. Anaconda keep a separated copy for installed package when you do a update. You probably can safely delete all the backups in /anaconda3/pkgs/, but it is maybe more wisely leave it to conda deal with.

P.S. you can try miniconda which have only a few default packages.

Upvotes: 6

Related Questions