2019-11-05 14:55:08 -05:00
---
2019-11-18 21:01:39 +02:00
section: cli-commands
2019-11-05 14:55:08 -05:00
title: npm-unpublish
description: Remove a package from the registry
---
2011-11-21 09:48:45 -08:00
2019-11-18 21:01:39 +02:00
# npm-unpublish(1)
2011-11-21 09:48:45 -08:00
2019-11-05 14:55:08 -05:00
## Remove a package from the registry
2011-11-21 09:48:45 -08:00
2019-11-05 14:55:08 -05:00
### Synopsis
2020-03-19 12:53:27 -04:00
#### Unpublishing a single version of a package
2019-11-05 14:55:08 -05:00
```bash
2020-03-19 12:53:27 -04:00
npm unpublish [< @scope >/]< pkg > @< version >
2019-11-05 14:55:08 -05:00
```
2020-03-19 12:53:27 -04:00
#### Unpublishing an entire package
2011-11-21 09:48:45 -08:00
2020-03-19 12:53:27 -04:00
```bash
npm unpublish [< @scope >/]< pkg > --force
```
2011-11-21 09:48:45 -08:00
2020-03-19 12:53:27 -04:00
### Warning
2011-11-21 09:48:45 -08:00
2020-03-19 12:53:27 -04:00
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.
2011-11-21 09:48:45 -08:00
2019-11-05 14:55:08 -05:00
### Description
2011-11-21 09:48:45 -08:00
This removes a package version from the registry, deleting its
entry and removing the tarball.
If no version is specified, or if all versions are removed then
the root package entry is removed from the registry entirely.
2014-03-19 09:25:40 -07:00
Even if a package version is unpublished, that specific name and
2018-08-29 12:03:09 -07:00
version combination can never be reused. In order to publish the
2020-03-19 12:53:27 -04:00
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.
2014-03-19 09:25:40 -07:00
2020-03-19 12:53:27 -04:00
To learn more about how unpublish is treated on the npm registry, see our < a href = "https://www.npmjs.com/policies/unpublish" target = "_blank" rel = "noopener noreferrer" > unpublish policies< / a > .
2017-04-12 21:47:49 -07:00
2014-09-24 14:41:07 -07:00
2019-11-05 14:55:08 -05:00
### See Also
2011-11-21 09:48:45 -08:00
2020-07-07 13:41:27 -05:00
* [npm deprecate ](/cli-commands/npm-deprecate )
* [npm publish ](/cli-commands/npm-publish )
2019-11-05 14:55:08 -05:00
* [npm registry ](/using-npm/registry )
2020-07-07 13:41:27 -05:00
* [npm adduser ](/cli-commands/npm-adduser )
* [npm owner ](/cli-commands/npm-owner )