npm uninstall is not removing node_modules/<package> folder from global dir while uninstalling certain packages

What I Wanted to Do

Completely uninstall global packages without leaving traces behind.

Tested using:

  • Cordova
  • npm-check-updates

What Happened Instead

node_modules/<package> directory was not removed completely.

Reproduction Steps

$ npm i cordova -g
$ npm rm cordova -g

$ npm i npm-check-updates -g
$ npm rm npm-check-updates -g

Details

Platform Info

$ npm --versions
6.12.0
$ node -p process.platform
win32