I want to delete db records when app uninstalled from marketplace or is there any api to uninstall app by programmatically
There is no webhook for uninstalling but when an app is uninstalled the permissions are revoked. You can use the Google Workspace Admin SDK Reports API to monitor these changes. You can set up a system to periodically check the API for these events and react accordingly.