1 ---
2 title: npm-outdated
3 section: 1
4 description: Check for outdated packages
5 github_repo: npm/cli
6 github_branch: latest
7 github_path: docs/lib/content/commands/npm-outdated.md
8 redirect_from:
9 - /cli-commands/npm-outdated
10 - /cli-commands/outdated
11 - /cli-documentation/cli-commands/npm-outdated
12 - /cli-documentation/cli-commands/outdated
13 - /cli-documentation/commands/npm-outdated
14 - /cli-documentation/commands/outdated
15 - /cli-documentation/npm-outdated
16 - /cli-documentation/outdated
17 - /cli-documentation/v10/cli-commands/npm-outdated
18 - /cli-documentation/v10/cli-commands/outdated
19 - /cli-documentation/v10/commands/npm-outdated
20 - /cli-documentation/v10/commands/outdated
21 - /cli-documentation/v10/npm-outdated
22 - /cli-documentation/v10/outdated
23 - /cli/cli-commands/npm-outdated
24 - /cli/cli-commands/outdated
25 - /cli/commands/npm-outdated
26 - /cli/commands/outdated
27 - /cli/npm-outdated
28 - /cli/outdated
29 - /cli/v10/cli-commands/npm-outdated
30 - /cli/v10/cli-commands/outdated
31 - /cli/v10/commands/outdated
32 - /cli/v10/npm-outdated
33 - /cli/v10/outdated
34 - /commands/npm-outdated
35 - /commands/outdated
36 ---
37
38 ### Synopsis
39
40 ```bash
41 npm outdated [<package-spec> ...]
42 ```
43
44 ### Description
45
46 This command will check the registry to see if any (or, specific) installed packages are currently outdated.
47
48 By default, only the direct dependencies of the root project and direct dependencies of your configured _workspaces_ are shown. Use `--all` to find all outdated meta-dependencies as well.
49
50 In the output:
51
52 - `wanted` is the maximum version of the package that satisfies the semver range specified in `package.json`. If there's no available semver range (i.e. you're running `npm outdated --global`, or the package isn't included in `package.json`), then `wanted` shows the currently-installed version.
53 - `latest` is the version of the package tagged as latest in the registry. Running `npm publish` with no special configuration will publish the package with a dist-tag of `latest`. This may or may not be the maximum version of the package, or the most-recently published version of the package, depending on how the package's developer manages the latest [dist-tag](/cli/v10/commands/npm-dist-tag).
54 - `location` is where in the physical tree the package is located.
55 - `depended by` shows which package depends on the displayed dependency
56 - `package type` (when using `--long` / `-l`) tells you whether this package is a `dependency` or a dev/peer/optional dependency. Packages not included in `package.json` are always marked `dependencies`.
57 - `homepage` (when using `--long` / `-l`) is the `homepage` value contained in the package's packument
58 - Red means there's a newer version matching your semver requirements, so you should update now.
59 - Yellow indicates that there's a newer version _above_ your semver requirements (usually new major, or new 0.x minor) so proceed with caution.
60
61 ### An example
62
63 ```bash
64 $ npm outdated
65 Package Current Wanted Latest Location Depended by
66 glob 5.0.15 5.0.15 6.0.1 node_modules/glob dependent-package-name
67 nothingness 0.0.3 git git node_modules/nothingness dependent-package-name
68 npm 3.5.1 3.5.2 3.5.1 node_modules/npm dependent-package-name
69 local-dev 0.0.3 linked linked local-dev dependent-package-name
70 once 1.3.2 1.3.3 1.3.3 node_modules/once dependent-package-name
71 ```
72
73 With these `dependencies`:
74
75 ```json
76 {
77 "glob": "^5.0.15",
78 "nothingness": "github:othiym23/nothingness#master",
79 "npm": "^3.5.1",
80 "once": "^1.3.1"
81 }
82 ```
83
84 A few things to note:
85
86 - `glob` requires `^5`, which prevents npm from installing `glob@6`, which is outside the semver range.
87 - Git dependencies will always be reinstalled, because of how they're specified. The installed committish might satisfy the dependency specifier (if it's something immutable, like a commit SHA), or it might not, so `npm outdated` and `npm update` have to fetch Git repos to check. This is why currently doing a reinstall of a Git dependency always forces a new clone and install.
88 - `npm@3.5.2` is marked as "wanted", but "latest" is `npm@3.5.1` because npm uses dist-tags to manage its `latest` and `next` release channels. `npm update` will install the _newest_ version, but `npm install npm` (with no semver range) will install whatever's tagged as `latest`.
89 - `once` is just plain out of date. Reinstalling `node_modules` from scratch or running `npm update` will bring it up to spec.
90
91 ### Configuration
92
93 #### `all`
94
95 - Default: false
96 - Type: Boolean
97
98 When running `npm outdated` and `npm ls`, setting `--all` will show all outdated or installed packages, rather than only those directly depended upon by the current project.
99
100 #### `json`
101
102 - Default: false
103 - Type: Boolean
104
105 Whether or not to output JSON data, rather than the normal output.
106
107 - In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`.
108
109 Not supported by all npm commands.
110
111 #### `long`
112
113 - Default: false
114 - Type: Boolean
115
116 Show extended information in `ls`, `search`, and `help-search`.
117
118 #### `parseable`
119
120 - Default: false
121 - Type: Boolean
122
123 Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
124
125 #### `global`
126
127 - Default: false
128 - Type: Boolean
129
130 Operates in "global" mode, so that packages are installed into the `prefix` folder instead of the current working directory. See [folders](/cli/v10/configuring-npm/folders) for more on the differences in behavior.
131
132 - packages are installed into the `{prefix}/lib/node_modules` folder, instead of the current working directory.
133 - bin files are linked to `{prefix}/bin`
134 - man pages are linked to `{prefix}/share/man`
135
136 #### `workspace`
137
138 - Default:
139 - Type: String (can be set multiple times)
140
141 Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option.
142
143 Valid values for the `workspace` config are either:
144
145 - Workspace names
146 - Path to a workspace directory
147 - Path to a parent workspace directory (will result in selecting all workspaces within that folder)
148
149 When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project.
150
151 This value is not exported to the environment for child processes.
152
153 ### See Also
154
155 - [package spec](/cli/v10/using-npm/package-spec)
156 - [npm update](/cli/v10/commands/npm-update)
157 - [npm dist-tag](/cli/v10/commands/npm-dist-tag)
158 - [npm registry](/cli/v10/using-npm/registry)
159 - [npm folders](/cli/v10/configuring-npm/folders)
160 - [npm workspaces](/cli/v10/using-npm/workspaces)