nuxt upgrade

Source
The upgrade command upgrades Nuxt to the latest version.
Terminal
npx nuxt upgrade [ROOTDIR] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--dedupe] [-f, --force] [-ch, --channel=<stable|nightly|v3|v4|v4-nightly|v3-nightly>]

The upgrade command upgrades Nuxt to the latest version. It updates the version in your package.json, reinstalls dependencies with your package manager and removes the build cache.

--channel picks what to upgrade to: stable for the latest release, v3 or v4 to stay on a major, and nightly, v3-nightly or v4-nightly for the nightly release channel.

--force recreates the lockfile and node_modules from scratch, and --dedupe deduplicates dependencies afterwards where the package manager supports it.

A dependency pinned to a pnpm catalog ("nuxt": "catalog:") is upgraded in pnpm-workspace.yaml, where the version actually lives, rather than in package.json.

Arguments

ArgumentDescription
ROOTDIRThe root directory of your Nuxt project (default: .)

Options

OptionDefaultDescription
--cwd=<directory>Specify the root directory of your Nuxt project
--logLevel=<silent|info|verbose>Specify build-time log level
--dedupeDedupe dependencies after upgrading
-f, --forceForce upgrade to recreate lockfile and node_modules
-ch, --channel=<stable|nightly|v3|v4|v4-nightly|v3-nightly>stableSpecify a channel to install from