Skip to content

Upgrading

Source URL: https://nextjs.org/docs/app/getting-started/upgrading

To update to the latest version of Next.js, you can use the upgrade command:

Terminal window
pnpm next upgrade
Terminal window
npx next upgrade
Terminal window
yarn next upgrade
Terminal window
bunx next upgrade

Next.js 15 and earlier do not support the upgrade command and need to use a separate package instead:

Terminal window
npx @next/codemod@canary upgrade latest

If you prefer to upgrade manually, install the latest Next.js and React versions:

Terminal window
pnpm i next@latest react@latest react-dom@latest eslint-config-next@latest
Terminal window
npm i next@latest react@latest react-dom@latest eslint-config-next@latest
Terminal window
yarn add next@latest react@latest react-dom@latest eslint-config-next@latest
Terminal window
bun add next@latest react@latest react-dom@latest eslint-config-next@latest

To update to the latest canary, make sure you’re on the latest version of Next.js and everything is working as expected. Then, run the following command:

Terminal window
pnpm add next@canary
Terminal window
npm i next@canary
Terminal window
yarn add next@canary
Terminal window
bun add next@canary

The following features are currently available in canary:

Authentication:

See the version guides for in-depth upgrade instructions.

  • Version 16
    • Upgrade your Next.js Application from Version 15 to 16.
  • Version 15
    • Upgrade your Next.js Application from Version 14 to 15.
  • Version 14
    • Upgrade your Next.js Application from Version 13 to 14.