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/v11/cli-commands/npm-outdated
18 - /cli-documentation/v11/cli-commands/outdated
19 - /cli-documentation/v11/commands/npm-outdated
20 - /cli-documentation/v11/commands/outdated
21 - /cli-documentation/v11/npm-outdated
22 - /cli-documentation/v11/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/v11/cli-commands/npm-outdated
30 - /cli/v11/cli-commands/outdated
31 - /cli/v11/commands/outdated
32 - /cli/v11/npm-outdated
33 - /cli/v11/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/v11/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 - `depended by location` (when using `--long` / `-l`) shows location of the package that depends on the displayed dependency
59 - Red means there's a newer version matching your semver requirements, so you should update now.
60 - Yellow indicates that there's a newer version _above_ your semver requirements (usually new major, or new 0.x minor) so proceed with caution.
61
62 ### An example
63
64 ```bash
65 $ npm outdated
66 Package Current Wanted Latest Location Depended by
67 glob 5.0.15 5.0.15 6.0.1 node_modules/glob dependent-package-name
68 nothingness 0.0.3 git git node_modules/nothingness dependent-package-name
69 npm 3.5.1 3.5.2 3.5.1 node_modules/npm dependent-package-name
70 local-dev 0.0.3 linked linked local-dev dependent-package-name
71 once 1.3.2 1.3.3 1.3.3 node_modules/once dependent-package-name
72 ```
73
74 With these `dependencies`:
75
76 ```json
77 {
78 "glob": "^5.0.15",
79 "nothingness": "github:othiym23/nothingness#master",
80 "npm": "^3.5.1",
81 "once": "^1.3.1"
82 }
83 ```
84
85 A few things to note:
86
87 - `glob` requires `^5`, which prevents npm from installing `glob@6`, which is outside the semver range.
88 - 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.
89 - `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`.
90 - `once` is just plain out of date. Reinstalling `node_modules` from scratch or running `npm update` will bring it up to spec.
91
92 ### Configuration
93
94 #### `all`
95
96 - Default: false
97 - Type: Boolean
98
99 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.
100
101 #### `json`
102
103 - Default: false
104 - Type: Boolean
105
106 Whether or not to output JSON data, rather than the normal output.
107
108 - In `npm pkg set` it enables parsing set values with JSON.parse() before saving them to your `package.json`.
109
110 Not supported by all npm commands.
111
112 #### `long`
113
114 - Default: false
115 - Type: Boolean
116
117 Show extended information in `ls`, `search`, and `help-search`.
118
119 #### `parseable`
120
121 - Default: false
122 - Type: Boolean
123
124 Output parseable results from commands that write to standard output. For `npm search`, this will be tab-separated table format.
125
126 #### `global`
127
128 - Default: false
129 - Type: Boolean
130
131 Operates in "global" mode, so that packages are installed into the `prefix` folder instead of the current working directory. See [folders](/cli/v11/configuring-npm/folders) for more on the differences in behavior.
132
133 - packages are installed into the `{prefix}/lib/node_modules` folder, instead of the current working directory.
134 - bin files are linked to `{prefix}/bin`
135 - man pages are linked to `{prefix}/share/man`
136
137 #### `workspace`
138
139 - Default:
140 - Type: String (can be set multiple times)
141
142 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.
143
144 Valid values for the `workspace` config are either:
145
146 - Workspace names
147 - Path to a workspace directory
148 - Path to a parent workspace directory (will result in selecting all workspaces within that folder)
149
150 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.
151
152 This value is not exported to the environment for child processes.
153
154 #### `before`
155
156 - Default: null
157 - Type: null or Date
158
159 If passed to `npm install`, will rebuild the npm tree such that only versions that were available **on or before** the given date are installed. If there are no versions available for the current set of dependencies, the command will error.
160
161 If the requested version is a `dist-tag` and the given tag does not pass the `--before` filter, the most recent version less than or equal to that tag will be used. For example, `foo@latest` might install `foo@1.2` even though `latest` is `2.0`.
162
163 ### See Also
164
165 - [package spec](/cli/v11/using-npm/package-spec)
166 - [npm update](/cli/v11/commands/npm-update)
167 - [npm dist-tag](/cli/v11/commands/npm-dist-tag)
168 - [npm registry](/cli/v11/using-npm/registry)
169 - [npm folders](/cli/v11/configuring-npm/folders)
170 - [npm workspaces](/cli/v11/using-npm/workspaces)