Cannot delete smart apps

I am trying to delete some smart apps that are custom code but when I do I get the error message below. I’m troubleshooting an issue so I would like to delete them.

You can contact ST support and they can remove them for you.

I’m waiting for replies. They are slow to reply to tickets.

You have to edit the device that was using that smart app, and detach it from the smart app. Then you can delete the smart app. But as long as there is a device associated with the smart app, you can’t delete it.

I’m trying to track it down