How to upgrade Angular CLI from Version 7 to 8

In this tutorial I will give you details on how you can upgrade Angular CLI 7 to Version 8.

Steps to Upgrade Angular CLI

  1. Uninstall existing Angular CLI
  2. Clean Npm cache
  3. Install latest version of Angular CLI

To checkout your current version of Angular CLI, you can execute following command from your terminal or from command prompt if your on windows.

ng --version

It will display the existing version you have installed on your system:

So as you can see in the above screen I have Angular CLI Version 7 currently installed, so let’s upgrade it to version 8

So to update angular-cli packages installed globally first we need to uninstall them and then clear the cache and install latest angular cli.

1. Un-Install Existing Angular CLI

npm uninstall -g angular-cli

If you on Mac you need to prefix the above commands with sudo.

Also if you are getting issue running above commands on windows then Open Power-shell on windows in Administrator Mode.

2. Verify/Clean NPM cache

npm cache verify 


Use following command only if your using npm version less that or equal to 5

npm cache clean

In my case I have npm 6 so I can use npm cache verify command as showing below:

Verifying npm cache

3. Install Latest version of Angular CLI

So after you have verify or clean cache depending on the npm version you use, next install latest version of angular CLI using below command:

npm install -g @angular/cli@latest
Installing Angular CLI Globally

Now we have successfully installed latest version of Angular Cli, you can ensure that by using ng command showing below:

ng --version

Upgrade Existing Angular 7 Project to Angular 8

If you want to upgrade your existing Angular 7 project to Angular 8 then open up your terminal and execute following command.

Please note before executing following command you should upgrade you Angular CLI first as showing in the above steps.

ng update @angular/core

The above command will get you all the latest libraries of Angular

We are done, let me know if you get any issue while updating Angular CLI on your system using comment box below.

Also you can read about complete angular development setup for your windows, linux or mac operating system from this tutorial – Setting up Angular Development Environment

Yogesh Koli

Software engineer & Blogger lives in India, has 6+ years of experience working with the front-end and back-end web app development.

Recent Posts

Complete guide of using Laravel 6 Eloquent Subquery Enhancements

Learn How to use laravel frameworks new improved feature called Eloquent Subquery and get example of using Eloquent Subqueries and…

4 months ago

3 Useful examples of using Array Map function in PHP – Best Practices

Learn how to use php array map function with easy and essential tutorial to modify arrays in php here I…

4 months ago

Working with PHP Array Filter Function – Best Practices

Learn how to use php array filter function with easy and essential tutorial to filter array in php here I…

4 months ago

How to add Access Modifiers with Constructor Parameters in TypeScript

Want to know how to refactor your Typescript class, Learn here utilising Typescript of the best and essential feature that…

4 months ago

What is Access Modifiers and how to use Access Modifiers in TypeScript ?

What is Access Modifiers in typescript, how to use Access Modifiers, when to use them, what are the advantage of…

5 months ago

Top 10 Super Useful Packages to Improve Laravel applications in 2019

This tutorial provide ultimate list of package those are top 10 on packagist and super useful to optimize your laravel…

5 months ago