How to Upgrade from Angular 15 to Angular 16?

By Hardik Savani October 20, 2023 Category : Angular

Hi Developer,

Today, I will let you know example of angular 15 to angular 16 upgrade. This article goes in detailed on angular upgrade version 16. This tutorial will give you a simple example of update @angular 15 to 16. Here you will learn upgrade angular cli to 16 in ubuntu. follow the below step for update angular 15 to 16.

When I was working on my angular application I need to update my angular 15 version to angular 16. I wan to run a command to update the angular version but I can not do it. it says to me some configuration is affected. so I thought about how I can update my angular 15 to angular 16.

I have two ways to upgrade your angular 15 to 15 first we will directly update your angular CLI version. if it's not working for you then you can uninstall and reinstall your angular CLI with the bellow steps.

Let's see both ways:

Way 1: Update Angular CLI:

You can directly upgrade your angular CLI version globally by using the update command of ng. so you can do it by bellow command.

ng update @angular/cli @angular/core

Now you can see ng version by following command:

ng version

Way 2: Update Angular CLI using reinstall:

I will show you list of commands for update version angular 15 to angular 16 by using uninstall and upgrade angular version.

Uninstall Angular CLI:

npm uninstall -g @angular/cli

Clear Cache:

npm cache clean --force

npm cache verify

Install Angular CLI:

npm install -g @angular/cli

Now you have new version of angular cli. so you can check it by following command:

ng version

You will see layout like as bellow:

I hope it can help you...

Shares