[BUG] `npm uninstall <name>@<version>` neither executes nor fails · Issue #9880 · npm/cli · GitHub
Skip to content

[BUG] npm uninstall <name>@<version> neither executes nor fails #9880

Closed

Description

@MikeMcC399

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

This is not just a request to bump a dependency for a CVE

  • This is not solely a request to bump a dependency for a CVE

Current Behavior

Incorrectly attempting to uninstall a package using npm uninstall <name>@<version> neither fails, nor uninstalls:

$ npm uninstall vite@8.2.1

up to date, audited 16 packages in 2s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
$ npm ls
tmp.Uwe8XKve3h@ /tmp/tmp.Uwe8XKve3h
└── vite@8.2.1

Expected Behavior

If an attempt is made to uninstall a package using npm uninstall <name>@<version> either:

  1. the command should fail with a syntax error or similar OR
  2. the <version> should be ignored and the uninstall command should use only the package <name> to uninstall

Steps To Reproduce

cd $(mktemp -d)
npm install vite@8
npm uninstall vite@8
npm ls

Environment

  • npm: 12.0.2
  • Node.js: 26.7.0
  • OS Name: Ubuntu 24.04.4 LTS
  • npm config:
; node bin location = /home/mike/n/bin/node
; node version = v26.7.0
; npm local prefix = /tmp/tmp.Uwe8XKve3h
; npm version = 12.0.2
; cwd = /tmp/tmp.Uwe8XKve3h
; HOME = /home/mike
; Run `npm config ls -l` to show all defaults.

Activity

  1. added
    cmd:installrelated to `npm install`
    and removed
    Needs Triageneeds review for next steps
    on Aug 18, 2026
  2. added a commit that references this issue on Aug 25, 2026
    da50c34
  3. self-assigned this
    on Aug 25, 2026
  4. added
    Priority 2secondary priority issue
    and removed on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 2secondary priority issuecmd:installrelated to `npm install`

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions