Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda Python: Delete .tar.gz in pkgs

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)?

like image 421
Bruno Avatar asked Jun 22 '17 20:06

Bruno


People also ask

Can I delete pkgs in Anaconda?

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."

How do I delete a Tar GZ file?

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.

How do I delete unused packages in conda?

"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.

How do you remove Anaconda cache?

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.


1 Answers

You can run conda clean --tarballs in your terminal.

Reference:

https://conda.io/docs/commands/conda-clean.html

like image 95
Oluwafemi Sule Avatar answered Oct 02 '22 07:10

Oluwafemi Sule