1

Hi I've tried to uninstall global @angular/cli but I still can use ng -v and it reports warning: Your global Angular CLI version (1.7.0) is greater than your local

I tried:

npm uninstall -g angular-cli
npm uninstall -g @angular/cli
npm cache verify

But ng -v still report the warning that my global is greater than local. Please help. Thank you in advance!

Evan
  • 487
  • 2
  • 7
  • 20
  • Is this actually causing an issue, or is it just annoying you a bit? – R. Richards Mar 10 '18 at 03:52
  • just annoying. I don't want to set global warning version off since I know when creating new component, it will use the global cmd – Evan Mar 11 '18 at 20:19

3 Answers3

1

Using following commands to uninstall :

1. Run the following command in your terminal to uninstall the angular cli (global) package.

npm uninstall -g @angular/cli

2. Clear the cache

npm cache clean --force

Note: In macOS, you need to add sudo before the npm command. Example for mac users:

sudo npm uninstall -g @angular/cli

If you are using an old version of angular-cli then you can uninstall it like this.

npm uninstall -g angular-cli

You can also install the latest version of angular cli by using the following command.

npm install -g @angular/cli@latest

for mac:

sudo npm install -g @angular/cli@latest
0

Try the Following steps to uninstall angular cli completely

npm uninstall -g angular-cli // Use sudo before to give administrator permission
npm uninstall -g @angular/cli // Use sudo before to give administrator permission

npm cache clean or npm cache clean --force

To reinstall the latest version try this

npm install -g @angular/cli@latest
M.A.K. Ripon
  • 1,800
  • 3
  • 27
  • 45
-2

Use this command to uninstall the angular-cli ,it will update the dependencies and also do try to clear the cache once.

npm uninstall --save-dev angular-cli
Sksaif Uddin
  • 532
  • 14
  • 20
  • The user is trying to uninstall the Global install of angular. Your command did not affect the global install and only uninstalled the local instance. – Joe Brinkman Feb 18 '21 at 21:11