conda env remove
does not run unlink transactions (pre_unlink, remove_menus, etc)
#11092
Labels
backlog
issue has been triaged but has not been earmarked for any upcoming release
plugins::env
pertains to conda-env
source::partner
created by or for an Anaconda, Inc. partner company
stale::recovered
[bot] recovered after being marked as stale
type::documentation
request for improved documentation
type::tech-debt
identifies or resolves some technical debt
Checklist
What happened?
One way to delete environments is through
conda env remove -n name
.My expectation is that this will uninstall all packages in the environment and then remove the directory.
However, it doesn't do so unless a list of packages is passed (?), possibly to optimize some IO; it goes straight to a
rm -rf prefix
call, bypassing ALL unlink actions. This is becausepackage_names
is (perhaps deliberately) left out of the args list in the call fromconda env remove
toconda remove
.The easy fix would be to add
package_names=None
to the passed args, but this might have been an intentional decision. I am not aware if this is documented, though.This results in some artifacts left in the system, like the shortcuts created by menuinst, which should be removed by the RemoveMenuAction objects created during the unlink transaction.
Conda info
conda info
Conda config
Conda list
conda list
Additional Context
conda remove --all -n name
does work as expected.The text was updated successfully, but these errors were encountered: