Can I delete files in the pkgs directory after installation.

1,343 views
Skip to first unread message

Ken Hisaki

unread,
Apr 11, 2015, 12:03:49 AM4/11/15
to anac...@continuum.io
I was wondering if I could remove archive files and its extracted files in pkgs directory after installing those packages.

The folder contains a lot of old version files too. That's why I want to remove them to save my disk space.

I'd like to make sure if it is no harm deleting all the files in pkgs directory including the latest version.

I think there is any problem to do so, because conda makes a hard link when installing a package.

My environment is Windows 8.1 (64bit).

Ilan Schnell

unread,
Apr 11, 2015, 12:11:39 AM4/11/15
to Anaconda
Hi Ken,
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.  The command "conda clean -p" will do that
for you, see "conda clean -h".

- Ilan

--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+u...@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/anaconda/.

Ken Hisaki

unread,
Apr 11, 2015, 4:47:22 AM4/11/15
to anac...@continuum.io
Hi Ilan,

Thank you for your answer.

Ken

2015年4月11日土曜日 13時11分39秒 UTC+9 Ilan:

ufo...@gmail.com

unread,
Jan 25, 2018, 10:18:27 AM1/25/18
to Anaconda - Public
Hi Ilan,

I find that both root and my environments work well even after I removed the anaconda3/pkgs cache directory.
Are there any other concerns regarding this action?
And could you clarify more on how efficient it would be to leave whatever
packages are in the cache around? 
I noticed that one same package exists repeatedly inside the library of both my root and environments.
Does this mean that it would not affect the efficiency even if the cache is removed completely?
The cache has taken up too much space on my MAC, like 3GB.
Thanks

- David

Ilan Schnell

unread,
Jan 26, 2018, 11:35:11 AM1/26/18
to Anaconda
Hi David,

conda was designed in a way that the 'pkgs' directory is a download cache, as well as a place where the downloaded conda packages get extracted.  The files from the extracted tarballs then get (hard) linked into conda environments.  So while removing the entire 'pkgs' directory is possible, the downside is that when you create new environments, the shared files from existing packages (in other environments) will no longer share the hard links.  Therefore the 'conda clean' command was created, see:

$ conda clean -h

for more details.

Regards   Ilan

To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.

To post to this group, send email to anac...@continuum.io.
Reply all
Reply to author
Forward
0 new messages