Help - App keeps loading older version on devices

Problem: When I install a new version of my app on the devices, the very first OLD app version keeps showing up, this happens on both ios and android, but the browser (ionic serve) and the emulators they always work fine.

What I do as walk around: On Android, I go to Settings --> Apps --> My app --> Storage and I clean/clear cache and Data. On iOS I don’t even know how to do the same. But even after doing this and browsing the app and shutting it down or go thru couple pages, the next time I bring it will still show older version again…

I use this command to build my package for example for Android: ionic cordova build android --prod --release

I have tried all the solutions I have seen like: removing the .www folder, bumping up the app version in config.xml,

Do you know what could be causing this and what to do to fix… For more details this is the output of my ionic info:


Ionic CLI : 5.2.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.6.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1


Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic 5.3.1, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 12 other plugins)


cordova-res : 0.5.1 (update available: 0.6.0)
native-run : 0.2.7 (update available: 0.2.8)


Android SDK Tools : 26.1.1 (/Users/mmugabospace2/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.3 Build version 10G8


 Update available: 5.2.1 → 5.2.8
  Run npm i -g ionic to update


My guess is … it is not fully compiling with --prod and you infact loading an older version. First try ng build --prod to see angular can fully build your app with production settings.

Thanks Edriven for your response, I tried ng build --prod and it went fine. I went thru quite bit of troubleshooting and executed some commands including the “cordova plugin remove cordova-plugin-ionc”, but I think the major culprit was that in the beginning I created the app on the Ionic App Flow, then never used it once again and I thought deleted the app but what I did was just to disconnect the ionic app flow from my git repo. So I think somehow it was still updating the package I was building on my local, overwriting the new version of the app with the old, but can’t tell for sure, but now it is working.

Thank you.