Would it be a problem to delete *.tar.gz files in C:\Users\username\AppData\Local\conda\pkgs
? I also see subdirectories of Python of the same Python package, but in different versions (e.g., pandas-0.19.2-np111py27_1
, pandas-0.19.2-np111py35_1
, pandas-0.20.1-np112py27_0
, pandas-0.20.1-np112py35_0
, pandas-0.20.1-np112py36_0
, pandas-0.20.2-np112py27_0
, pandas-0.20.2-np112py36_0
, pandas-0.20.2-np113py36_0
). I currently have two environments (Python 2.7 and 3.6), so I don't want to be wasting storage with different versions of the same package, or for Python versions I'm not currently using (I'm talking GB here!). Is there a proper way of deleting those files/directories (and is there a problem in doing that)?
As stated here by Anaconda Community Support "the pkgs directory is only a cache. You can remove it completely is you want to. However, when creating new environments, it is more efficient to leave whatever packages are in the cache around."
Simply right-click the item you want to compress, mouseover compress, and choose tar. gz. You can also right-click a tar. gz file, mouseover extract, and select an option to unpack the archive.
"conda clean --all --dry-run" is listing unused packages as well. (mycondaenv) C:\myrepo>conda clean --packages --dry-run Will remove 685 (9.45 GB) package(s). DryRunExit: Dry run. Exiting.
So, how do we clean up this cache and regain some disk space? We can try going into the 'pkgs' directory and manually clean them up. Or, we can go the easy way, by using the 'conda clean' command. This will clean the index cache, lock files, tarballs, unused cache packages, and the source cache.
You can run conda clean --tarballs
in your terminal.
https://conda.io/docs/commands/conda-clean.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With