Cleaning the target before redeploying a BAR file

After an app's BAR file has been deployed on the target, we recommend uninstalling the app before redeploying and reinstalling it. You can do this in Qt Creator by creating a second deployment configuration to clean the app's installation on the target.

You can also issue these commands manually through a QNX Neutrino terminal connected to the target and the result will be the same.
To clean an app's installation on the target:
  1. Click the Projects icon on left side, select the Build & Run tab, click the Add button in the line that reads Method, then choose Deploy to QNX Device.
  2. Click the Rename... button on the same line, change the name to Clean QNX Device, then click OK.
  3. Remove the Upload files via SFTP step by hovering over the item and clicking the removal button, which is marked with an X.
  4. Click the Add Deploy Step button, then choose Run custom remote command.
  5. In the Command Line text field, enter the line:
    /base/scripts/bar-uninstall com.mycompany.QtApp
    To uninstall an app, you must provide its ID, which is found in the app descriptor file. For the QtApp project, the ID (com.mycompany.QtApp) is specified in the fourth element listed inside the root <qnx> element in bar-descriptor.xml.
There are now two deployment methods. You must choose either Deploy to QNX Device or Clean QNX Device from the Method dropdown menu before running Deploy Project "QtApp" in the Build menu. To deploy the BAR file and install the app, switch to Deploy to QNX Device before running the deployment step. To clean the app's installation on the target, choose Clean QNX Device before redeploying the app.