Skip to content

[BUG] npm unpublish --force <package-name>@<version> deletes all versions  #7015

Closed
@trusktr

Description

@trusktr

Current Behavior

I ran

npm unpublish @lume/[email protected]

and it would not work. The output told me I needed to add --force. I added --force,

npm unpublish --force @lume/[email protected]

and this deleted the whole package, all the versions, despite having specified a version.

NPM support told me this can't be fixed. 😠😡👿

Expected Behavior

Expected behavior is npm deletes only the specified version. Big ass WTF.

https://x.com/trusktr/status/1726910009580339544?s=20

The documentation clearly says:

To unpublish a single package version, run npm unpublish <package_name>@<version>.

If all the versions of a package can be unpublished, you can unpublish all versions at once by running npm unpublish <package_name> --force.

It does not state that --force ignores any specified version, which is mind blowing. 🤯

I AM ANGRY!!!!!!!!!!!!!!
😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡😡

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Steps To Reproduce

Steps are above.

Environment

  • npm: 10
  • Node.js: 20
  • OS Name: macOS
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 0will get attention right awayRelease 10.x

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions