ncu [filter...]

Upgrade your npm package.json dependencies to the latest versions, ignoring specified versions

Arguments

NameDescription
filterA list or regex of package names to check (all others will be ignored)

Options

NameDescription
--cacheCache versions to a local cache file. Default --cacheFile is ~/.ncu-cache.json and default --cacheExpiration is 10 minutes
--cacheClearClear the default cache, or the cache file specified by --cacheFile
--cacheExpiration <min>Cache expiration in minutes. Only works with --cache. (default: 10)
--cacheFile <path>Filepath for the cache file. Only works with --cache. (default: "~/.ncu-cache.json")
--colorForce color in terminal
--concurrency <n>Max number of concurrent HTTP requests to registry. (default: 8)
--configFileName <s>Config file name. (default: .ncurc.{json,yml,js,cjs})
--configFilePath <path>Directory of .ncurc config file. (default: directory of packageFile)
--cwd <path>Working directory in which npm will be executed
--deepRun recursively in current working directory. Alias of (--packageFile '**/package.json')
--dep <value>Check one or more sections of dependencies only: dev, optional, peer, prod, or packageManager (comma-delimited). (default: ["prod","dev","optional"])
--deprecatedInclude deprecated packages
--doctor, -dIteratively installs upgrades and runs tests to identify breaking upgrades. Requires -u to execute. Run "ncu --help --doctor" for details
--doctorInstall <command>Specifies the install script to use in doctor mode. (default: npm install/yarn)
--doctorTest <command>Specifies the test script to use in doctor mode. (default: npm test)
--enginesNodeInclude only packages that satisfy engines.node as specified in the package file
--errorLevel, -e <n>Set the error level. 1: exits with error code 0 if no errors occur. 2: exits with error code 0 if no packages need updating (useful for continuous integration). (default: 1)
--filter, -f <p>Include only package names matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function
--filterResultsFilters out upgrades based on a user provided function. Run "ncu --help --filterResults" for details
--filterVersion <p>Filter on package version using comma-or-space-delimited list, /regex/, or predicate function
--format <value>Modify the output formatting or show additional information. Specify one or more comma-delimited values: group, ownerChanged, repo, time, lines. Run "ncu --help --format" for details. (default: [])
--global, -gCheck global packages instead of in the current project
--groupFunctionCustomize how packages are divided into groups when using --format group. Run "ncu --help --groupFunction" for details
--help, -hShow help
--interactive, -iEnable interactive prompts for each dependency; implies -u unless one of the json options are set
--jsonAll, -jOutput new package file instead of human-readable message
--jsonDepsLike jsonAll but only lists dependencies, devDependencies, optionalDependencies, etc of the new package data
--jsonUpgradedOutput upgraded dependencies in json
--loglevel, -l <n>Amount to log: silent, error, minimal, warn, info, verbose, silly. (default: "warn")
--mergeConfigMerges nested configs with the root config file for --deep or --packageFile options. (default: false)
--minimal, -mDo not upgrade newer versions that are already satisfied by the version range according to semver
--packageData <value>Package file data (you can also use stdin)
--packageFile <path|glob>Package file(s) location. (default: ./package.json)
--packageManager, -p <s>Npm, yarn, pnpm, deno, staticRegistry (default: npm). Run "ncu --help --packageManager" for details
--peerCheck peer dependencies of installed packages and filter updates to compatible versions. Run "ncu --help --peer" for details
--pre <n>Include prerelease versions, e.g. -alpha.0, -beta.5, -rc.2. Automatically set to 1 when --target is newest or greatest, or when the current version is a prerelease. (default: 0)
--prefix <path>Current working directory of npm
--registry, -r <uri>Third-party npm registry. Run "ncu --help --registry" for details
--reject, -x <p>Exclude packages matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function
--rejectVersion <p>Exclude package.json versions using comma-or-space-delimited list, /regex/, or predicate function
--removeRangeRemove version ranges from the final package version
--retry <n>Number of times to retry failed requests for package info. (default: 3)
--rootRuns updates on the root project in addition to specified workspaces. Only allowed with --workspace or --workspaces. (default: false)
--silent, -sDon't output anything. Alias for --loglevel silent
--stdinRead package.json from stdin
--target, -t <value>Determines the version to upgrade to: latest, newest, greatest, minor, patch, @[tag], or [function]. (default: latest) Run "ncu --help --target" for details
--timeout <ms>Global timeout in milliseconds. (default: no global timeout and 30 seconds per npm-registry-fetch)
--upgrade, -uOverwrite package file with upgraded versions instead of just outputting to console
--verboseLog additional information for debugging. Alias for --loglevel verbose
--version, -vOutput the version number of npm-check-updates
--workspace, -w <s>Run on one or more specified workspaces. Add --root to also upgrade the root project. (default: [])
--workspaces, -wsRun on all workspaces. Add --root to also upgrade the root project