LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

npm-unpublish

removes a package from registry

TLDR

Unpublish package version
$ npm unpublish [package]@[version]
copy
Unpublish entire package
$ npm unpublish [package] --force
copy
Dry run
$ npm unpublish [package]@[version] --dry-run
copy

SYNOPSIS

npm unpublish [package] [options]

DESCRIPTION

npm unpublish removes a published package or version from the npm registry. Because removing a package can break consumers anywhere in the dependency graph, the registry restricts what may be removed and when.Within 72 hours of publication, you may freely unpublish a version or the entire package. After that, the registry only allows unpublishing if no other package depends on it and the package owner is the sole maintainer; otherwise contact npm support. After unpublishing an entire package, the same name cannot be republished for 24 hours, and any unpublished name@version pair can never be reused.

PARAMETERS

PACKAGE

Package name and optional version.
--force
Required to unpublish an entire package (all versions) instead of a single version.
--dry-run
Show what would be removed without actually unpublishing.
--workspace NAME
Run the command in the context of the specified workspace.
--workspaces
Run the command across all configured workspaces.
--help
Display help information.

CAVEATS

May break consumers that depend on the version being removed. Use npm deprecate instead when you only want to discourage use without deleting the artifact.

HISTORY

npm unpublish provides package removal with restrictions to prevent ecosystem breakage.

SEE ALSO

Copied to clipboard
Kai