# Cleanup Policy for maven2 except maven-hosted repositories

**URL:** <https://community.sonatype.com/t/cleanup-policy-for-maven2-except-maven-hosted-repositories/3818>\
**Category:** Sonatype Nexus Repository\
**Created:** [April 3, 2020, 4:55am UTC](https://community.sonatype.com/t/cleanup-policy-for-maven2-except-maven-hosted-repositories/3818 "2020-04-03T04:55:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijetha.aravindan](https://avatars.discourse-cdn.com/v4/letter/v/e274bd/32.png) [@vijetha.aravindan](https://community.sonatype.com/u/vijetha.aravindan)\
**Post date:** [April 3, 2020, 4:55am UTC](https://community.sonatype.com/t/cleanup-policy-for-maven2-except-maven-hosted-repositories/3818/1 "2020-04-03T04:55:22Z")

</div>

We are using Nexus-3.15.1-01 and would like to run cleanup policy for maven2 format.  
But we would like to delete only the proxy repositories and keep maven-hosted repositories. Is there any way to keep maven-hosted not being deleted. please provide your suggestions

---

<div class="post-metadata">

**Author:** ![dsawa](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/dsawa/32/729_2.png) [@dsawa](https://community.sonatype.com/u/dsawa)\
**Post date:** [April 3, 2020, 10:17am UTC](https://community.sonatype.com/t/cleanup-policy-for-maven2-except-maven-hosted-repositories/3818/2 "2020-04-03T10:17:27Z")

</div>

Cleanup Policies are applied on repository basis, so you will have to apply the desired policy on all your maven hosted repositories. After you created cleanup policy you can apply it to any repository you wish in repository settings.
