Problem running app after build but not serve - what files/directory to delete?

My app is rather large so I can’t build it running the ‘ionic cordova build ios --prod --release’ command since the production build takes up more than 1.4 GB of ram and I error out. I edited the package.json to allow node to use up to 8 GB of RAM and now I can successfully build the app through ‘npm run ionic:build --prod’ followed by a release build ‘cordova build ios --release’

Well I accidentally ran ‘ionic cordova build ios --release’ after the npm run command and now I’m having issues with my application in the xcode emulate and on my device. I would like to keep the same src directory and start a build from scratch, but I’m not sure which files and folders are safe to delete.

Should I delete the ‘www’ directory and then build again from scratch? Or should I delete the platform directory and then re-add ios?

Thanks in advance for any advice!

Solved it - removed the platform through terminal command ‘ionic cordova rm ios’ then re-added it and I also deleted my www folder and did a build from scratch!