1NPM-UNPUBLISH(1)                                              NPM-UNPUBLISH(1)
2
3
4

NAME

6       npm-unpublish - Remove a package from the registry
7
8   Synopsis
9       To  learn  more about how the npm registry treats unpublish, see our <a
10       href="https://docs.npmjs.com/policies/unpublish"        target="_blank"
11       rel="noopener noreferrer"> unpublish policies</a>
12
13   Unpublishing a single version of a package
14         npm unpublish [<@scope>/]<pkg>@<version>
15
16   Unpublishing an entire package
17         npm unpublish [<@scope>/]<pkg> --force
18
19   Warning
20       Consider  using  the npm help deprecate command instead, if your intent
21       is to encourage users to upgrade, or if you no longer want to  maintain
22       a package.
23
24   Description
25       This  removes  a  package version from the registry, deleting its entry
26       and removing the tarball.
27
28       The npm registry will return an error if you are not  npm  help  logged
29       in.
30
31       If  you  do  not  specify a version or if you remove all of a package's
32       versions then the registry will remove the root package entry entirely.
33
34       Even if you unpublish a package version, that specific name and version
35       combination can never be reused. In order to publish the package again,
36       you must use a new version number. If you unpublish the entire package,
37       you  may  not  publish  any new versions of that package until 24 hours
38       have passed.
39
40   Configuration
41       <!-- AUTOGENERATED CONFIG DESCRIPTIONS  START  -->  <!--  automatically
42       generated,  do  not edit manually --> <!-- see lib/utils/config/defini‐
43       tions.js -->
44
45   dry-run
46       • Default: false
47
48       • Type: Boolean
49
50
51       Indicates that you don't want npm to  make  any  changes  and  that  it
52       should only report what it would have done. This can be passed into any
53       of the commands that modify your local installation, eg,  install,  up‐
54       date, dedupe, uninstall, as well as pack and publish.
55
56       Note:  This  is  NOT  honored  by  other  network  related commands, eg
57       dist-tags, owner, etc.  <!-- automatically generated, do not edit manu‐
58       ally --> <!-- see lib/utils/config/definitions.js -->
59
60
61   force
62       • Default: false
63
64       • Type: Boolean
65
66
67       Removes  various  protections  against unfortunate side effects, common
68       mistakes, unnecessary performance degradation, and malicious input.
69
70       • Allow clobbering non-npm files in global installs.
71
72       • Allow the npm version command to work on an unclean git repository.
73
74       • Allow deleting the cache folder with npm cache clean.
75
76       • Allow installing packages that have an engines declaration  requiring
77         a different version of npm.
78
79       • Allow  installing packages that have an engines declaration requiring
80         a different version of node, even if --engine-strict is enabled.
81
82       • Allow npm audit fix to install modules outside your stated dependency
83         range (including SemVer-major changes).
84
85       • Allow unpublishing all versions of a published package.
86
87       • Allow  conflicting  peerDependencies  to  be  installed  in  the root
88         project.
89
90       • Implicitly set --yes during npm init.
91
92       • Allow clobbering existing values in npm pkg
93
94
95       If you don't have a clear idea of what you want to do, it  is  strongly
96       recommended that you do not use this option!  <!-- automatically gener‐
97       ated, do not edit manually --> <!-- see lib/utils/config/definitions.js
98       -->
99
100
101   workspace
102       • Default:
103
104       • Type: String (can be set multiple times)
105
106
107       Enable running a command in the context of the configured workspaces of
108       the current project while filtering by running only the workspaces  de‐
109       fined by this configuration option.
110
111       Valid values for the workspace config are either:
112
113       • Workspace names
114
115       • Path to a workspace directory
116
117       • Path  to  a  parent workspace directory (will result in selecting all
118         workspaces within that folder)
119
120
121       When set for the npm init command, this may be set to the folder  of  a
122       workspace  which does not yet exist, to create the folder and set it up
123       as a brand new workspace within the project.
124
125       This value is not exported to  the  environment  for  child  processes.
126       <!--  automatically  generated,  do  not  edit  manually  -->  <!-- see
127       lib/utils/config/definitions.js -->
128
129
130   workspaces
131       • Default: null
132
133       • Type: null or Boolean
134
135
136       Set to true to run  the  command  in  the  context  of  all  configured
137       workspaces.
138
139       Explicitly  setting  this  to false will cause commands like install to
140       ignore workspaces altogether. When not set explicitly:
141
142       • Commands that operate on  the  node_modules  tree  (install,  update,
143         etc.)   will link workspaces into the node_modules folder. - Commands
144         that do other things (test, exec, publish, etc.) will operate on  the
145         root  project,  unless  one  or  more workspaces are specified in the
146         workspace config.
147
148
149       This value is not exported to  the  environment  for  child  processes.
150       <!--  automatically  generated,  do  not  edit  manually  -->  <!-- see
151       lib/utils/config/definitions.js -->
152
153       <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
154
155
156   See Also
157       • npm help deprecate
158
159       • npm help publish
160
161       • npm help registry
162
163       • npm help adduser
164
165       • npm help owner
166
167       • npm help login
168
169
170
171
172                                 January 2022                 NPM-UNPUBLISH(1)
Impressum