Once a Miniforge is installed, it’s capable of upgrading any package within its base… but typically one only really needs to upgrade the things actually used from it, e.g. mamba and its dependencies:
mamba upgrade mamba
As for created environments, it’s possible to use mamba upgrade for each “interesting” package interactively, but a more predictable approach is to use an environment.yml file:
Indeed, this can be the only command one really needs to master (beyond activate) , as if the sage environment were to not exist, it would be created from scratch.
So Miniforge consists of mamba and conda that are pre-configured to work with conda-forge ?
yes.
The upgrade and update commands do the same thing ?
no.
They both do something to an environment, specified with --name or --prefix. mamba upgrade takes a list of package specs at the command line, while mamba env update uses a file.
What does mamba update --all do ?
--all will update everything, potentially python or other things you might not anticipate.
Will it update mamba and sage both ?
no.
No single command invocation (to my knowledge) will act on two different environments.
do the following:?
no.
I think what is requested would be more like:
mamba upgrade -n base mamba
mamba upgrade -n sage sage
These subtle differences are why I recommend working with mamba env update as the single, reproducible, version-control-friendly way to keep environments in an expected state.
No, I don’t think so – mamba update --all updates all the packages in current environment – if you haven’t activated anything, that would be the base environment.
yes. You can accomplish the same thing with:
conda activate sage
conda (or mamba) update --all
[*]
To be clear: conda (and mamba) are all about environments. As a rule, you don’t want to use the base environment for anything other than running the system.
So: If you want to update (or add to , or …) your sage environment – then activate it and do your updating there. If you want to update the minforge system, THEN you update the base environment.
So you’ve done the right thing by creating a “sage” environment in which to run sage. If that’s mostly what you do – you may want to set up your system to automatically active the sage environment when you log in – then it will be ready to go, and you won’t accidentally mess with the base environment by accident.
HTH,
-CHB
[*] I’m pretty sure that miniforge is set up with conda using the “mamba solver” – and the faster solver is really the advantage of mamba over conda – so when I use miniforge, I just use plain old conda.