There is no difference in effect.
Conda has two remove
commands:
conda remove
- for removing packages
conda env remove
- for removing environments
Both have a --name,-n
argument that specifies the environment on which to operate. Only the former also has an --all
flag, which effectively does the same thing as the latter.1
Obsolete (From Original Answer)
The original first example in the question had a typo and was invalid because it indicated to remove package(s) from an environment, but did not specify any packages. Running it would have yielded an error message:
$ conda remove -n myenv
CondaValueError: no package names supplied,
try "conda remove -h" for more details
[1] This is a slightly inconsistent API design, in my opinion. Since one can create an empty environment, I believe a more symmetric result of conda remove --all
would be that it remove all the packages but still retain the empty environment. Users that want to operate on a whole environment level should being using conda env
commands. Unfortunately, this overlap of functionality is an artifact of ontogeny, namely, conda-env
was originally a separate package that came after conda
, and so conda remove -n envname --all
was the original idiom for environment removal.