Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
npm-deprecate.md86 linesDownload Raw Back to commands
1---
2title: npm-deprecate
3section: 1
4description: Deprecate a version of a package
5---
6
7### Synopsis
8
9```bash
10npm deprecate <package-spec> <message>
11```
12
13Note: This command is unaware of workspaces.
14
15### Description
16
17This command will update the npm registry entry for a package, providing a deprecation warning to all who attempt to install it.
18
19It works on [version ranges](https://semver.npmjs.com/) as well as specific versions, so you can do something like this:
20
21```bash
22npm deprecate my-thing@"< 0.2.3" "critical bug fixed in v0.2.3"
23```
24
25SemVer ranges passed to this command are interpreted such that they *do* include prerelease versions.
26For example:
27
28```bash
29npm deprecate my-thing@1.x "1.x is no longer supported"
30```
31
32In this case, a version `my-thing@1.0.0-beta.0` will also be deprecated.
33
34You must be the package owner to deprecate something.
35See the `owner` and `adduser` help topics.
36
37To un-deprecate a package, specify an empty string (`""`) for the `message` argument.
38Note that you must use double quotes with no space between them to format an empty string.
39
40### Configuration
41
42#### `registry`
43
44* Default: "https://registry.npmjs.org/"
45* Type: URL
46
47The base URL of the npm registry.
48
49
50
51#### `otp`
52
53* Default: null
54* Type: null or String
55
56This is a one-time password from a two-factor authenticator. It's needed
57when publishing or changing package permissions with `npm access`.
58
59If not set, and a registry response fails with a challenge for a one-time
60password, npm will prompt on the command line for one.
61
62
63
64#### `dry-run`
65
66* Default: false
67* Type: Boolean
68
69Indicates that you don't want npm to make any changes and that it should
70only report what it would have done. This can be passed into any of the
71commands that modify your local installation, eg, `install`, `update`,
72`dedupe`, `uninstall`, as well as `pack` and `publish`.
73
74Note: This is NOT honored by other network related commands, eg `dist-tags`,
75`owner`, etc.
76
77
78
79### See Also
80
81* [package spec](/using-npm/package-spec)
82* [npm publish](/commands/npm-publish)
83* [npm registry](/using-npm/registry)
84* [npm owner](/commands/npm-owner)
85* [npm adduser](/commands/npm-adduser)
86 
codekingpro/portable-devtools · Team Ai