How to delete protected app?

We use self hosted Retool with source control. I want to move a protected app to TRASH in staging and have it removed from our Production environment. Not sure how to do this.

I can't move it to TRASH in staging because it is protected. Should I simply Remove Protection in staging? And will that automatically take it off of Production? It's not clear from this doc what happens.

I Removed Protection, and that action prompted a pull request. That was merged, and protection is removed in both Staging and PROD. But the app remains in PROD. Anyone know how to delete it from there?

The app cannot simply be deleted from our PROD environment because that is disabled. Screenshot doesn't show the disabled icon.

Screenshot 2024-05-08 at 9.36.31 AM

I also tried selecting the app in the list, and then choosing an option to Delete it, but got a message that it's not allowed.
Screenshot: screenshot-retool-default.prod.opzerk.com-2024.05.08-09_39_58 - FuseBase Capture

Found out that this is a long standing known bug (at least 9 months) where source control / git syncing does not remove apps that were unprotected. Here is the workaround:

For posterity: the workaround is to SSH into prod Retool, edit your docker.env file to comment out VERSION_CONTROL_LOCKED=true and restart Retool by running docker-compose up -d in that directory.

From there, you can delete the app in prod Retool. Then undo the change above to ensure that apps can't be edited in prod.

:warning: This makes it so that you can edit apps in prod, which you don't want, so don't forget to undo that change once you're done.