3

I want to remove a package reinstalled with npx.

I tried removing the package from where it's installed (C:\Users\vince\AppData\Roaming\npm) by deleting manually the ps1, bat and the package folder and it still didn't worked.

I tried to remove it using npx react-devtools --remove and it still didn't got removed(NPX Didn't showed any output indicating that it sucessfully removed react-devtools). Here is how the command look:

PS C:\Users\vince\project\js\tinder-cli> npx react-devtools --remove

I expect npx to remove react-devtools with a sucess message or something like a sucess message.

2 Answers 2

2

I uninstall the package by deleting all the content of the directory: C:\Users\vince\AppData\Local\npm-cache\_npx

Sign up to request clarification or add additional context in comments.

Comments

1

I think the clean way to remove selected packages installed using npx is to first find their keys with:

npm cache npx ls

You'll get something like:

0dd5ae94e53e6f06: @eslint/migrate-config
1415fee72ff6294b: create-vite@latest
1d6e82a4126006c4: (empty/invalid)
81f7a6092050d914: [email protected]
917ffaa823e769de: @eslint/mcp@latest
9e26927975f330cf: @rage-against-the-pixel/unity-cli
abdb4b598af046c4: (unknown)

Then you can remove the packages by the keys with, for example:

npm cache npx rm 1d6e82a4126006c4 abdb4b598af046c4

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.