Use `-f --all` for conda clean up
MODIFY
repo2docker/buildpacks/conda/__init__.py
repo2docker/buildpacks/conda/__init__.py
@@ -182,9 +182,8 @@ class CondaBuildPack(BaseImage):
'${NB_USER}',
r"""
conda env update -p {0} -f "{1}" && \
- conda clean -tipsy && \
- conda list -p {0} && \
- rm -rf /srv/conda/pkgs
+ conda clean --all -f -y && \
+ conda list -p {0}
""".format(env_prefix, environment_yml)
))
return super().get_assemble_scripts() + assembly_scripts

MODIFY
repo2docker/buildpacks/conda/install-miniconda.bash
repo2docker/buildpacks/conda/install-miniconda.bash
@@ -68,12 +68,12 @@ if [[ -f /tmp/kernel-environment.yml ]]; then
fi
# Clean things out!
-conda clean -tipsy
-rm -rf /srv/conda/pkgs
+conda clean --all -f -y
# Remove the big installer so we don't increase docker image size too much
rm ${INSTALLER_PATH}
-# Remove pip cache created as part of installing miniconda
+
+# Remove the pip cache created as part of installing miniconda
rm -rf /root/.cache
chown -R $NB_USER:$NB_USER ${CONDA_DIR}

Use `-f --all` for conda clean up