# How to delete multiple versioned package using curl?

**URL:** <https://community.sonatype.com/t/how-to-delete-multiple-versioned-package-using-curl/8393>\
**Category:** Best Practices\
**Created:** [March 21, 2022, 1:27pm UTC](https://community.sonatype.com/t/how-to-delete-multiple-versioned-package-using-curl/8393 "2022-03-21T13:27:05Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![palla714](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@palla714](https://community.sonatype.com/u/palla714)\
**Post date:** [March 21, 2022, 1:27pm UTC](https://community.sonatype.com/t/how-to-delete-multiple-versioned-package-using-curl/8393/1 "2022-03-21T13:27:06Z")

</div>

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  
curl -v -u ${NEXUS\_CREDS} -X “DELETE” http://${SONATYPE\_NEXUS\_SERVICE\_SERVICE\_HOST}:${SONATYPE\_NEXUS\_SERVICE\_SERVICE\_PORT}/repository/${NEXUS\_REPO\_NAME}/${APP\_NAME}/${PACKAGE}

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

---

_[View the full topic](https://community.sonatype.com/t/how-to-delete-multiple-versioned-package-using-curl/8393)._
