update
Commandng update [packages..] [options]Perform a basic update to the current stable release of the core framework and CLI by running the following command.
ng update @angular/cli @angular/core
To update to the next beta or pre-release version, use the --next option.
To update from one major version to another, use the format
ng update @angular/cli@^<major_version> @angular/core@^<major_version>
We recommend that you always update to the latest patch version, as it contains fixes we released since the initial major release. For example, use the following command to take the latest 21.x.x version and use that to update.
ng update @angular/cli@^21 @angular/core@^21
For detailed information and guidance on updating your application, see the interactive Angular Update Guide.
Arguments
packagesThe names of package(s) to update.
Value TypearrayOptions
allow-dirtyWhether to allow updating when the repository contains modified or untracked files.
Value TypebooleanDefaultfalsecreate-commitsAliasCCreate source control commits for updates and migrations.
Value TypebooleanDefaultfalseforceIgnore peer dependency version mismatches.
Value TypebooleanDefaultfalsefromVersion from which to migrate from. Only available when a single package is updated, and only with 'migrate-only'.
Value TypestringhelpShows a help message for this command in the console.
Value Typebooleanmigrate-onlyOnly perform a migration, do not update the installed version.
Value TypebooleannameThe name of the migration to run. Only available when a single package is updated.
Value TypestringnextUse the prerelease version, including beta and RCs.
Value TypebooleanDefaultfalsetoVersion up to which to apply migrations. Only available when a single package is updated, and only with 'migrate-only' option. Requires 'from' to be specified. Default to the installed version detected.
Value TypestringverboseDisplay additional details about internal operations during execution.
Value TypebooleanDefaultfalse