3

I'm trying to uninstall a globally installed npm package named commitizen.

When I run this npm uninstall -g commitizen, this returns no results:

up to date in 0.035s

I restarted the machine.

Now, to check if the package indeed got uninstalled or not I'm running commitizen expecting an error however to my surprise the command is still available:

commitizen

The result of npm list -g --depth 0 or npm list -g commitizen:

npm list -g --depth 0 or npm list -g commitizen

The result of npm list -g commitizen:

npm list -g commitizen

The result of cd /usr/local/lin/node_modules

cd /usr/local/lin/node_modules

So the question is what is the right approach of globally deleting the npm package?

xameeramir
  • 25,752
  • 22
  • 132
  • 205

2 Answers2

1

One way to check would be running npm list -g --depth 0 or npm list -g commitizen

If you want to check the package locally, head to /usr/local/lin/node_modules

Jiri Kralovec
  • 1,062
  • 8
  • 14
1

Uninstalling global packages might answer this question:

"So the question is what is the right approach of globally deleting the npm package?"


In addition, I had a similar problem on windows 10. I solve it just by upgrading npm to the latest version.

Make sure it works with npm ls -g --depth=0 or npm list -g commitizen.

If that still doesn't work try to running npm uninstall -g commitizen one more time.

Kevin
  • 363
  • 7
  • 19