Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

npm-unpublish (1)

Name

npm-unpublish - Remove a package from the registry Synopsis npm unpublish [<@scope>/]<pkg>[@<version>] To learn more about how the npm registry treats unpublish, see our <a href="https://docs.npmjs.com/policies/unpublish" target="_blank" rel="noopener noreferrer"> unpublish policies</a> Warning Consider using the npm help deprecate command instead, if your intent is to encourage users to upgrade, or if you no longer want to maintain a package. Description This removes a package version from the registry, deleting its entry and removing the tarball. The npm registry will return an error if you are not npm help logged in. If you do not specify a version or if you remove all of a package's versions then the registry will remove the root package entry entirely. Even if you unpublish a package version, that specific name and version combination can never be reused. In order to publish the package again, you must use a new version number. If you unpublish the entire package, you may not publish any new versions of that package until 24 hours have passed. Configuration dry-run o Default: false o Type: Boolean Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, install, update, dedupe, uninstall, as well as pack and publish. Note: This is NOT honored by other network related commands, eg dist-tags, owner, etc. force o Default: false o Type: Boolean Removes various protections against unfortunate side effects, common mistakes, unnecessary performance degradation, and malicious input. o Allow clobbering non-npm files in global installs. o Allow the npm version command to work on an unclean git repository. o Allow deleting the cache folder with npm cache clean. o Allow installing packages that have an engines declaration requiring a different version of npm. o Allow installing packages that have an engines declaration requiring a different version of node, even if --engine-strict is enabled. o Allow npm audit fix to install modules outside your stated dependency range (including SemVer-major changes). o Allow unpublishing all versions of a published package. o Allow conflicting peerDependencies to be installed in the root project. o Implicitly set --yes during npm init. o Allow clobbering existing values in npm pkg o Allow unpublishing of entire packages (not just a single version). If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option! workspace o Default: o Type: String (can be set multiple times) 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. Valid values for the workspace config are either: o Workspace names o Path to a workspace directory o Path to a parent workspace directory (will result in selecting all workspaces within that folder) 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. This value is not exported to the environment for child processes. workspaces o Default: null o Type: null or Boolean Set to true to run the command in the context of all configured workspaces. Explicitly setting this to false will cause commands like install to ignore workspaces altogether. When not set explicitly: o Commands that operate on the node_modules tree (install, update, etc.) will link workspaces into the node_modules folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, unless one or more workspaces are specified in the workspace config. This value is not exported to the environment for child processes. See Also o npm help deprecate o npm help publish o npm help registry o npm help adduser o npm help owner o npm help login

Synopsis

Please see following description for synopsis

Description

NPM-UNPUBLISH(1)                                              NPM-UNPUBLISH(1)



NAME
       npm-unpublish - Remove a package from the registry

   Synopsis
         npm unpublish [<@scope>/]<pkg>[@<version>]

       To  learn  more about how the npm registry treats unpublish, see our <a
       href="https://docs.npmjs.com/policies/unpublish"        target="_blank"
       rel="noopener noreferrer"> unpublish policies</a>

   Warning
       Consider  using  the npm help deprecate command instead, if your intent
       is to encourage users to upgrade, or if you no longer want to  maintain
       a package.

   Description
       This  removes  a  package version from the registry, deleting its entry
       and removing the tarball.

       The npm registry will return an error if you are not  npm  help  logged
       in.

       If  you  do  not  specify a version or if you remove all of a package's
       versions then the registry will remove the root package entry entirely.

       Even if you unpublish a package version, that specific name and version
       combination can never be reused. In order to publish the package again,
       you must use a new version number. If you unpublish the entire package,
       you  may  not  publish  any new versions of that package until 24 hours
       have passed.

   Configuration
   dry-run
       o Default: false

       o Type: Boolean


       Indicates that you don't want npm to  make  any  changes  and  that  it
       should only report what it would have done. This can be passed into any
       of the commands that  modify  your  local  installation,  eg,  install,
       update, dedupe, uninstall, as well as pack and publish.

       Note:  This  is  NOT  honored  by  other  network  related commands, eg
       dist-tags, owner, etc.

   force
       o Default: false

       o Type: Boolean


       Removes various protections against unfortunate  side  effects,  common
       mistakes, unnecessary performance degradation, and malicious input.

       o Allow clobbering non-npm files in global installs.

       o Allow the npm version command to work on an unclean git repository.

       o Allow deleting the cache folder with npm cache clean.

       o Allow  installing packages that have an engines declaration requiring
         a different version of npm.

       o Allow installing packages that have an engines declaration  requiring
         a different version of node, even if --engine-strict is enabled.

       o Allow npm audit fix to install modules outside your stated dependency
         range (including SemVer-major changes).

       o Allow unpublishing all versions of a published package.

       o Allow conflicting  peerDependencies  to  be  installed  in  the  root
         project.

       o Implicitly set --yes during npm init.

       o Allow clobbering existing values in npm pkg

       o Allow unpublishing of entire packages (not just a single version).


       If  you  don't have a clear idea of what you want to do, it is strongly
       recommended that you do not use this option!

   workspace
       o Default:

       o Type: String (can be set multiple times)


       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.

       Valid values for the workspace config are either:

       o Workspace names

       o Path to a workspace directory

       o Path to a parent workspace directory (will result  in  selecting  all
         workspaces within that folder)


       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.

       This value is not exported to the environment for child processes.

   workspaces
       o Default: null

       o Type: null or Boolean


       Set  to  true  to  run  the  command  in  the context of all configured
       workspaces.

       Explicitly setting this to false will cause commands  like  install  to
       ignore workspaces altogether. When not set explicitly:

       o Commands  that  operate  on  the  node_modules tree (install, update,
         etc.)  will link workspaces into the node_modules folder. -  Commands
         that  do other things (test, exec, publish, etc.) will operate on the
         root project, unless one or more  workspaces  are  specified  in  the
         workspace config.


       This value is not exported to the environment for child processes.

   See Also
       o npm help deprecate

       o npm help publish

       o npm help registry

       o npm help adduser

       o npm help owner

       o npm help login




ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+--------------------------+
       |ATTRIBUTE TYPE |     ATTRIBUTE VALUE      |
       +---------------+--------------------------+
       |Availability   | runtime/nodejs/nodejs-18 |
       +---------------+--------------------------+
       |Stability      | Pass-thru volatile       |
       +---------------+--------------------------+

NOTES
       Source  code  for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source    was   downloaded   from    https://github.com/nodejs/node/ar-
       chive/v18.1.0.zip.

       Further information about this software can be found on the open source
       community website at https://github.com/nodejs/node.



                                  April 2022                  NPM-UNPUBLISH(1)