2025-03-14 21:59:59 -06:00
|
|
|
# npm unpublish
|
|
|
|
|
|
|
|
|
|
> Remove a package from the npm registry.
|
2025-05-08 12:26:01 -06:00
|
|
|
> More information: <https://docs.npmjs.com/cli/commands/npm-unpublish>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Unpublish a specific package version:
|
|
|
|
|
|
|
|
|
|
`npm unpublish {{package_name}}@{{version}}`
|
|
|
|
|
|
|
|
|
|
- Unpublish the entire package:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`npm unpublish {{package_name}} {{[-f|--force]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Unpublish a package that is scoped:
|
|
|
|
|
|
|
|
|
|
`npm unpublish @{{scope}}/{{package_name}}`
|
|
|
|
|
|
|
|
|
|
- Specify a timeout period before unpublishing:
|
|
|
|
|
|
|
|
|
|
`npm unpublish {{package_name}} --timeout {{time_in_milliseconds}}`
|
|
|
|
|
|
|
|
|
|
- To prevent accidental unpublishing, use the `--dry-run` flag to see what would be unpublished:
|
|
|
|
|
|
|
|
|
|
`npm unpublish {{package_name}} --dry-run`
|