Meet my collaborators
It takes a village to develop a blog on the topic of building a tool that deletes apps from ODC instances. So, I’d also like to thank the teams that made this project happen:
Important reminder before we start
Just remember: with the power to bulk-delete comes the responsibility to ensure you never run this against production environments.
This technique lets you wipe every app from your environment in one go, but remember: there is no rollback. Please be mindful of the risks. Deleting an app permanently means potentially losing months of hard work, so double-check everything before you hit enter.
Yeah yeah yeah, enough of the dad talk, let’s get to the good part.
Managing API clients
In the ODC Portal of your tenant, you’re gonna click on API Clients and create a new one.

Give it a name. Most importantly, under Asset Management, give it Delete permissions.

That’s it, so hit the Create API button.
Make sure you copy client_id and client_secret
Wanna know more about API clients? Get in touch.
ODC Studio
Now, in ODC Studio, create a new web application, go straight to the APIs section, and under the Logic tab, call four APIs:
Openid config: https://<<ODC_INFRA>>/identity/.well-known/openid-configuration
Token: <<method URL will come from the first API>>
Get Assets: https://<<ODC_INFRA>>/api/asset-repository/v1/assets
Delete Asset: https://<<ODC_INFRA>>/api/asset-repository/v1/assets/{assetKey}
Let’s create a new Screen and call that Config and make it the default screen, there we’ll call the config and token APIs:

P.S. Check out this really good “Get access token” documentation by OutSystems.
P.S². Pay attention to the fact that the token call needs to be in the URL encoded format.
Next, let’s create a screen to list the assets, passing the token as a parameter.

When we click on Next, it shows the apps to be deleted.

See the deleted apps in the console.

Conclusion
The most important thing here is to be careful to delete only undesired apps. This tool keeps your environment sharp, but at the same time, you can self-inflict some real damage here by deleting an app you don’t want to.
To make it easier to understand more about Client APIs, for studying purposes, or to clean up your environment, I have made this component available on the Forge.
References
Configure API access using an API client
Generate client secret
Get Access Token
Using OAuth 2.0 to access the APIs