How to update Sanity from 3.19.3 to 3.26.0 using npm?

21 replies
Last updated: Jan 27, 2026
I have been away for the last couple of months dealing with family stuff, and now I have come back feeling like I can't remember how to do anything work-related, HA! Anyway, I am trying to update our Sanity from 3.19.3 to 3.26.0 and I can not, for the life of me, remember what the command is to update it, and I can't find it anywhere. Doing
npm update sanity
does not update to 3.26.0. I feel so silly and like the answer is obvious and right in front of me, but my brain just can't see it. 🤦‍♀️ Can someone please put me out of my misery here?!
AI Update

Don't worry, we've all been there! Welcome back, and I hope things are better with your family 🙂

The command you're looking for is:

npm install sanity@latest

This will update Sanity to the latest version (3.26.0 in your case). The reason npm update doesn't work is that it respects the version range in your package.json, so it's probably staying within whatever semver range is specified there (like ^3.19.3).

You can also use the Sanity CLI command:

sanity upgrade

Or if you don't have the CLI installed globally:

npx -y sanity@latest upgrade

The sanity upgrade command is smart about respecting version ranges and selectively upgrading Sanity-related packages while leaving other dependencies alone. It'll also show you a prominent message if there are major updates available with links to the changelog.

After running either command, restart your dev server and you should be good to go!

Show original thread
21 replies

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?