@reggi/path-to-regexp
@reggi/path-to-regexp
dependabot/npm_and_yarn/main/copy-to-clipboard-4.0.2
dependabot/npm_and_yarn/main/eslint-10.4.0
dependabot/npm_and_yarn/main/npmcli/eslint-config-7.0.0
dependabot/npm_and_yarn/main/proc-log-7.0.0
dependabot/npm_and_yarn/npm_and_yarn-826852524d
dependabot/npm_and_yarn/npm_and_yarn-ab9a7f4bc2
deprecate-totp-2fa
dhei/classic-tokens
gat-bypass-2fa-docs
jpg619/fix-accessibility-content-flow
jpg619/version-bump-tar-2
kartykp/gat-bypass-2fa-docs
kartykp/upgrade-path-to-regex
main
maitxn/version-bump-tar
patch-1
reggi/cache-based-on-version
reggi/dev-engines
reggi/fix-transform-prettier
reggi/overrides
update-search-sensitivity
| 1 | --- |
| 2 | title: npm-unpublish |
| 3 | section: 1 |
| 4 | description: Remove a package from the registry |
| 5 | github_repo: npm/cli |
| 6 | github_branch: release/v6 |
| 7 | github_path: docs/content/commands/npm-unpublish.md |
| 8 | redirect_from: |
| 9 | - /cli-documentation/v6/cli-commands/npm-unpublish |
| 10 | - /cli-documentation/v6/cli-commands/unpublish |
| 11 | - /cli-documentation/v6/commands/npm-unpublish |
| 12 | - /cli-documentation/v6/commands/unpublish |
| 13 | - /cli-documentation/v6/npm-unpublish |
| 14 | - /cli-documentation/v6/unpublish |
| 15 | - /cli/v6/cli-commands/npm-unpublish |
| 16 | - /cli/v6/cli-commands/unpublish |
| 17 | - /cli/v6/commands/unpublish |
| 18 | - /cli/v6/npm-unpublish |
| 19 | - /cli/v6/unpublish |
| 20 | --- |
| 21 | |
| 22 | ### Synopsis |
| 23 | |
| 24 | #### Unpublishing a single version of a package |
| 25 | |
| 26 | ```bash |
| 27 | npm unpublish [<@scope>/]<pkg>@<version> |
| 28 | ``` |
| 29 | |
| 30 | #### Unpublishing an entire package |
| 31 | |
| 32 | ```bash |
| 33 | npm unpublish [<@scope>/]<pkg> --force |
| 34 | ``` |
| 35 | |
| 36 | ### Warning |
| 37 | |
| 38 | Consider using the `deprecate` command instead, if your intent is to encourage users to upgrade, or if you no longer want to maintain a package. |
| 39 | |
| 40 | ### Description |
| 41 | |
| 42 | This removes a package version from the registry, deleting its entry and removing the tarball. |
| 43 | |
| 44 | If no version is specified, or if all versions are removed then the root package entry is removed from the registry entirely. |
| 45 | |
| 46 | Even if a package version is unpublished, that specific name and version combination can never be reused. In order to publish the package again, a new version number must be used. If you unpublish the entire package, you may not publish any new versions of that package until 24 hours have passed. |
| 47 | |
| 48 | To learn more about how unpublish is treated on the npm registry, see our [https://www.npmjs.com/policies/unpublish](unpublish policies). |
| 49 | |
| 50 | ### See Also |
| 51 | |
| 52 | - [npm deprecate](/cli/v6/commands/npm-deprecate) |
| 53 | - [npm publish](/cli/v6/commands/npm-publish) |
| 54 | - [npm registry](/cli/v6/using-npm/registry) |
| 55 | - [npm adduser](/cli/v6/commands/npm-adduser) |
| 56 | - [npm owner](/cli/v6/commands/npm-owner) |