It is possible to upgrade ionic automatically?

Update to the latest version of Ionic 6:

npm install @ionic/angular@6

But my project is ionic3,there are a lot of pages and apis that need to be changed。

This is an impossible task if you can’t automatically update older versions of the code used in project

in my opinion it’s not possible for several reasons.
You don’t only need to update Ionic Core and dependencies but all plugins inside your project need to be updated and each of them has a different way for doing it.

I was in the same situation with a Ionic 3 App, it took me 1 or 2 days to update to Ionic 5 and all its plugins but after that all the upgrades (version 6) were easy and painless.

The only thing that took a little more time was the passage to capacitor but I absolutely changed my life with this transition: cordova was too unstable.

My suggestion is to create a new blank ionic project and then add, plugin after plugin, the capacitor 4 versions (if supported) to the new blank app. At this point start copying the code, so you can immediately see what works and what doesn’t: a step by step procedure which prevents to lose your mind with an extremely high number of errors.

I think you need to focus on the upgrade guide for angular as the driving force for any dependency update, like ionic.

And honestly, if the step is too big, better start a new project and gradually copy/paste code, while checking if things continue to work