Not sure if it is the official way but:
You can unlink your app as described here: https://docs.mendix.com/developerportal/deploy/licensing-apps#unlink
This will delete all data and unlink your app from the node.
Then you can redploy the app to a new free node.
The only way to do that is creating a microflow that deletes all objects of all the attributes. Depending on how large your app is not real funny to do. But it might be the only sollution. And I have not tried it myself but in the community commons there is an action deleteAll that accepts a string. You could use MX model reflection to itterate over all your objects to retrieve the string values and then use this Java action to delete them.
I’am agree with Ronald.
The only way is to have a microflow that delete all Data.
But if you have modeling your database correctly and manage Delete in cascade objects.
It can be a very simple microflow.
Probably not the solution you are looking for, but you can always upload your app under a new name and configure the old app to redirect to it. That is the simplest, lowest effort option IOP.