I think that it depends on what your goal is.
When I'm wearing my "deploy the standard set of applications" hat, I
don't ever update it. I clone a fresh tree and run a [standard
installation script][spack-install]. I keep the old trees around
until they're no longer needed (might be teams migrating or just me
ensuring that my personal kit works).
When I'm working on something and just want to bring an existing clone
of the repository up to date, I:
```
cd <spack directory>
git checkout develop
git fetch
# look at what was fetched, and if I'm happy
git merge origin/develop
# then do the following for each of my works in progress
git checkout some-wip-branch
git rebase develop
# deal with any fallout
# and then perhaps reinstall packages of interest.
```
That gets the source tree updated. But what about your installed
packages? You could delete everything and re-install, now you're back
at my "just clone a new tree". You could just start installing
additional packages without changing what you've already installed,
but see below.
What about installing packages that have had newer versions released
since you installed them? I don't think that Spack has any equivalent
of Homebrew's `brew outdated`, `brew upgrade`, or `brew update`. I
handle this via my 'clone a new tree' mechanism.
I've found that, except for hacking around, updating trees in place
leads to inconsistencies and eventual pain (though it works well
enough that it's worth doing in controlled short-term situations).
- Sometimes (rarely, lately) the way hashes are calculated changes and
you'll end up with multiple installed copies of a package+variants,
which leads to confusion.
- Even if you're installing particular versions of packages
(e.g. emacs@25.3+tls), you're unlikely to be pinning every package
in your complete dependency graph so previously built packages might
depend on one version of something while others depend on a newer
version. Depending on how you're generating your modulefiles,
taking the "default" (aka newest) may no longer get you what you're
expecting.
Having said all of that, what exactly are you trying to do?
g.
[spack-install]:
https://gist.github.com/hartzell/d7d067e59695575c47e1c86b898b37fc