Version Management (agave-install / avm)
Pin Agave/Solana CLI and Anchor versions with agave-install and avm so every machine and CI job compiles and deploys against the same runtime.
Search across all documentation pages
Pin Agave/Solana CLI and Anchor versions with agave-install and avm so every machine and CI job compiles and deploys against the same runtime.
Quick-reference recipe card - copy-paste ready.
agave-install init 4.1.1
solana --version
avm install 0.32.1
avm use 0.32.1
anchor --versionWhen to reach for this:
latest install broke builds.# Pin Agave / Solana CLI
sh -c "$(curl -sSfL https://release.anza.xyz/v4.1.1/install)"
agave-install init 4.1.1
solana --version
# Pin Anchor via avm
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install 0.32.1
avm use 0.32.1
anchor --version
# Per-project Anchor.toml enforces CLI for anchor commands
grep '^anchor_version' Anchor.toml || echo 'anchor_version = "0.32.1"' >> Anchor.tomlWhat this demonstrates:
agave-install init selects the validator/CLI release channel.avm use switches the anchor binary on PATH.Anchor.toml anchor_version warns when CLI mismatch would corrupt IDL builds.agave-install downloads release artifacts into ~/.local/share/solana/install/active_release.bin directory for solana, cargo-build-sbf, etc.avm stores multiple Anchor CLI builds under ~/.avm and symlinks the active one.rustup (pin 1.91.1 with rust-toolchain.toml).| Layer | Tool | Pin method |
|---|---|---|
| Validator/CLI | agave-install | init 4.1.1 |
| Anchor CLI | avm | use 0.32.1 |
| anchor-lang crate | Cargo.toml | 0.32.1 |
| Rust compiler | rustup | rust-toolchain.toml |
# List installed Agave releases
agave-install list
# List installed Anchor versions
avm listsolana overrides Agave install. Fix: which solana and reorder PATH.avm use step in pipeline.cargo build-sbf. Fix: commit rust-toolchain.toml with 1.91.1.| Alternative | Use When | Don't Use When |
|---|---|---|
rust-toolchain.toml only | Rust-only services | Full Solana CLI pinning |
| Nix / Docker dev shells | Hermetic team environments | Quick solo laptop setup |
mucho version helpers | Foundation template repos | Custom multi-repo layouts |
| Manual tarball extract | Air-gapped installs | Normal internet-connected dev |
Yes - use Anza release URLs (release.anza.xyz) for Agave 4.x onward.
Add rust-toolchain.toml with channel = "1.91.1" at the repo root.
Yes - run avm use when switching directories or use direnv hooks.
Align avm use, Anchor.toml anchor_version, and anchor-lang crate version to the same release.
Install new version, run full anchor test and deploy dry-run on devnet, then update team docs.
No - only the CLI binary. Cargo.toml still pins program dependencies.
agave-install list then remove unused directories per Anza docs, or reinstall clean channel.
Cache the install directory keyed on version 4.1.1 for speed; verify with solana --version each run.
Install matching release alongside Agave when using verifiable build pipelines.
Use package.json "@solana/kit": "7.0.0" - separate from Agave/Anchor pins.
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 19, 2026