There are few steps to upgrade 2/4/5 to Angular 6.
npm uninstall --save-dev angular-cli
npm install --save-dev @angular/cli@latest
npm install
To fix the issue related to "angular.json" :-
ng update @angular/cli --migrate-only --from=1.7.4
Store MIGRATION
https://github.com/ngrx/platform/blob/master/MIGRATION.md#ngrxstore
RXJS MIGRATION
https://www.academind.com/learn/javascript/rxjs-6-what-changed/
Hoping this will help you :)