We can update the Angular CLI version in a global package and in your local project. To update the Angular CLI package globally, run the following command:
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
To update the CLI in your local project folder, run the command here:
rm -rf node_modules dist # use rmdir /S/Q node_modules dist in Windows
Command Prompt; use rm -r -fo node_modules,dist in Windows PowerShell
npm install --save-dev @angular/cli@latest
npm install