-1

I'm trying to upgrade to 10 on a mac
How do I find and delete an old version?

I tried these two steps, but version 8.00 is still there

Step 1 :

sudo npm uninstall -g @angular/cli  

Step 2 :

sudo npm cache clean --force

Here I got

preferred-user:~ puser$ sudo npm uninstall -g @angular/cli
Password:
up to date in 0.058s
preferred-user:~ puser$ sudo npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
preferred-user:~ puser$ ng version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.0.0
Node: 12.9.1
OS: darwin x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.800.0
@angular-devkit/core         8.0.0
@angular-devkit/schematics   8.0.0
@schematics/angular          8.0.0
@schematics/update           0.800.0
rxjs                         6.4.0
Wasim
  • 600
  • 2
  • 11
  • 32
Mathias
  • 4,243
  • 4
  • 25
  • 34
  • 1
    Does this answer your question? [Cannot uninstall angular-cli](https://stackoverflow.com/questions/43070441/cannot-uninstall-angular-cli) – Roy Jun 28 '20 at 15:46
  • @Roy no. I have tried all steps on that post. – Mathias Jun 28 '20 at 15:51

2 Answers2

1

you can install nvm (node version manager), through this you can install multiple nodejs versions and can install latest version of angular-cli.

Link to guide how to install nvm

Usman Ali
  • 374
  • 1
  • 10
  • I only want the most current version – Mathias Jun 28 '20 at 16:32
  • 1
    It's a secondary solution if angular-cli is not uninstalling. You can also remove nodejs but you can lose data – Usman Ali Jun 28 '20 at 16:51
  • It seems to be something to do with homebrew that was installed on this machine Once I uninstalled that and reinstalled node the CLI install is working as expected – Mathias Jun 28 '20 at 17:32
0

Uninstalled homebrew and reinstalled node the CLI install is working as expected
Homebrew had the old version of Angular in it's /cellar folder

Mathias
  • 4,243
  • 4
  • 25
  • 34