Yes, you can the standalone loader.
you’ll find option to delete versions, it will do all the deadlifting for you.
Alternatively, you can use ayon-python-api
or use the REST API directly.
e.g. operation/delete_product
Currently, I don’t have an example for deleting products but there’s a guide about using the api.