This article is written with reference to NPM Chinese document

Function of NPM unpublish

Remove the package from the registry

Use NPM unpublish

npm unpublish [<@scope>/]<pkg>[@<version>]Copy the code

NPM unpublish warning

In general, it is bad behavior to delete library versions that others depend on!

Deprecate If your goal is to encourage users to upgrade, consider using this command.

There is plenty of space on the registry.

NPM unpublish instructions

This will remove the package version from the registry, delete its entry, and remove the compressed package.

If no version is specified, or if all versions are deleted, the root package entry is completely removed from the registry.

Even if a package version is not released, that particular name and version combination can never be reused.

In order to redistribute the package, you must use a new version number. In addition, a new version of a package that has not been released with every version may not be re-released until 24 hours later.

Use the default registry (registry.npmjs.org) to allow only releases that have been published within the last 72 hours to be unpublished.

If you want to cancel releases earlier than this, please contact [email protected].

Scope is optional and follows the general rule nPM-scope. This article refers to the NPM Chinese documentation