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

NAME

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