Guide

Update pinned templates

Pinned templates are local copies. Over time the upstream source changes. spin update refreshes the cache.

Update one template

spin update go-cli-template

spin update re-clones or re-copies the source into ~/.config/spin/templates/go-cli-template/. The old cache is moved aside first; if the refresh fails, spin rolls back to the previous version.

Update every pinned template

spin update

Templates are refreshed in the order they appear in pinned.json. Failures are reported per template; the loop does not stop on the first error.

What changes

  • The on-disk cache is replaced with the latest upstream version.
  • The version field in pinned.json is updated to the new git HEAD SHA (git sources) or local (local sources).
  • The pin name, source, and pinned_at timestamp stay the same.

When a template is gone

If the upstream source is no longer reachable, spin update reports the error and leaves the previous cache in place (rollback). You can still use the old version until the source is available again, or remove the pin with spin remove.