How to delete multiple versioned package using curl?

I am trying to delete Nexus package which are associated with more than one version. I am running a curl command to delete it, but I want a generic command which will delete all package under a folder

This is the curl command I am using

where PACKAGE ="${APP_NAME}-${VERSION}.tar.gz". I need to provide a command which will not delete a particular version only.

There isn’t an official API that can do that as far as I know. You can use the UI to delete a folder of items from the browse tree. You could also figure out how to call that API, but it’s an internal one so that won’t be supported and could change at any time.

You may be able to use the search APIs to find versions then use those to execute many delete requests.