Run cleanup after environment installs
Conda environments are removed using a simple shutil.rmtree(env_path)
on the environment directory. But conda uses hardlinks to link packages into environments as a space saving measure, so this removal only removes a hardlink to the package in $conda_base/base/pkgs
. This leaves a lot of orphan files behind that are no longer used, eventually filling up the partition that holds the conda installs.
After removing environments, the update_conda.py
script should run conda clean -p -t
to remove any unreferenced packages.