Spack Migration for Existing Users

This page is intended for users migrating from Spack 0.23.0 to Spack 1.1.1. For general usage, see the Spack 2026 documentation.

Table of Contents

  1. Collect Specs from Existing Installations
  2. Clean Setup and Switch to Spack 1.1.1
  3. Rebuild Packages on 1.1.1

Collect Specs from Existing Installations

Before switching to Spack 1.1.1, record the concrete specs of packages you installed with the old setup.

List explicitly installed root packages with variants and hashes:

spack find --explicit -vl

Save this list for later:

spack find --explicit -vl > ~/spack-legacy-explicit.txt

Inspect one concrete installation by hash:

spack spec /<hash>

Example:

spack spec /oyhql6p
[+]  abinit@10.0.9%intel@2021.10.0~install-tests~libxml2+mpi+openmp~scalapack~wannier90 build_system=autotools optimization-flavor=standard arch=linux-almalinux9-zen3
[+]      ^hdf5@1.8.23%intel@2021.10.0~cxx~fortran+hl~ipo+mpi+shared~szip~threadsafe+tools api=default build_system=cmake build_type=Release generator=make patches=f42732a arch=linux-almalinux9-zen3
[+]      ^intel-oneapi-mkl@2024.2.2%gcc@11.4.1~cluster+envmods~gfortran~ilp64+shared build_system=generic mpi_family=mpich threads=openmp arch=linux-almalinux9-zen3
[+]      ^intel-oneapi-mpi@2021.14.0%intel@2021.10.0~classic-names+envmods+external-libfabric~generic-names~ilp64 build_system=generic arch=linux-almalinux9-zen3

Repeat this for each package you want to rebuild and note:

  • package name and version
  • enabled/disabled variants
  • compiler
  • important dependency pins (for example MPI, MKL, FFTW, BLAS etc.)

Clean Setup and Switch to Spack 1.1.1

This is not an in-place migration. Treat this as a fresh setup.

  1. Remove old Spack lines from your ~/.bashrc (if present), for example:

    export MODULEPATH=$MODULEPATH:$HOME/spack/share/spack/lmod/linux-almalinux9-x86_64/Core
    . /cluster/spack/0.23.0/share/spack/setup-env.sh

    Remove these first. Otherwise, spack/2026 may detect an old SPACK_ROOT and print a warning.

  2. Deploy fresh user configs:

    rub-deploy-spack-configs-2026

    This command checks whether ~/.spack exists and moves it into a backup directory before writing new config files.

  3. Load the new Spack module:

    module load spack/2026

If you want this active in every login shell, add the last line to your ~/.bashrc.


Rebuild Packages on 1.1.1

After loading spack/2026, reinstall your packages based on the specs you collected:

spack install <package>@<version> <variants> %<compiler> ^<dependency>@<version>

Example:

spack install hdf5@1.14.3 +mpi +cxx %gcc@13.4.0 ^openmpi@5.0.9

Old installation hashes from 0.23.0 cannot be reused directly on 1.1.1; use them only to look up and reconstruct the desired concrete specs.