# Using Nexus API to delete components

**URL:** <https://community.sonatype.com/t/using-nexus-api-to-delete-components/1787>\
**Category:** Sonatype Nexus Repository\
**Created:** [May 14, 2019, 2:12pm UTC](https://community.sonatype.com/t/using-nexus-api-to-delete-components/1787 "2019-05-14T14:12:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MCrt](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@MCrt](https://community.sonatype.com/u/MCrt)\
**Post date:** [May 14, 2019, 2:12pm UTC](https://community.sonatype.com/t/using-nexus-api-to-delete-components/1787/1 "2019-05-14T14:12:22Z")

</div>

I’m trying to work out a way of deleting several old components from Nexus via the API. The reason that we can’t apply a blanket _‘delete things older than X’_ rule is that we have several components spread over Nexus that are no longer being developed (so the latest version is quite old), but we still rely on it being there.

That led me to looking at using the Nexus API to do the job. However, I seem to only be able to return results from the entire repository at once, rather than just return results from a specific folder within the repository. Has anybody done anything similar with Nexus? Or am I completely barking up the wrong tree?

---

<div class="post-metadata">

**Author:** ![karankaushik](https://avatars.discourse-cdn.com/v4/letter/k/c89c15/32.png) [@karankaushik](https://community.sonatype.com/u/karankaushik)\
**Post date:** [July 4, 2019, 1:44pm UTC](https://community.sonatype.com/t/using-nexus-api-to-delete-components/1787/2 "2019-07-04T13:44:02Z")

</div>

Hi

I had the exact same problem, unfortunately you need to browse through all of it to find exactly which component it is that you are delete.

Regards  
Karan
