• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2section: cli-commands
3title: npm-deprecate
4description: Deprecate a version of a package
5---
6# npm-deprecate(1)
7
8## Deprecate a version of a package
9
10### Synopsis
11```bash
12npm deprecate <pkg>[@<version>] <message>
13```
14
15### Description
16
17This command will update the npm registry entry for a package, providing
18a deprecation warning to all who attempt to install it.
19
20It works on [version ranges](https://semver.npmjs.com/) as well as specific
21versions, so you can do something like this:
22```bash
23npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
24```
25
26Note that you must be the package owner to deprecate something.  See the
27`owner` and `adduser` help topics.
28
29To un-deprecate a package, specify an empty string (`""`) for the `message`
30argument. Note that you must use double quotes with no space between them to
31format an empty string.
32
33### See Also
34
35* [npm publish](/cli-commands/npm-publish)
36* [npm registry](/using-npm/registry)
37