# How to add the default task 'Cleanup service'

**URL:** <https://community.sonatype.com/t/how-to-add-the-default-task-cleanup-service/12082>\
**Category:** Sonatype Nexus Repository\
**Tags:** help\
**Created:** [February 14, 2024, 9:41am UTC](https://community.sonatype.com/t/how-to-add-the-default-task-cleanup-service/12082 "2024-02-14T09:41:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tofsaf](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@tofsaf](https://community.sonatype.com/u/tofsaf)\
**Post date:** [February 14, 2024, 9:41am UTC](https://community.sonatype.com/t/how-to-add-the-default-task-cleanup-service/12082/1 "2024-02-14T09:41:23Z")

</div>

Hi,

we inadvertently deleted the “Cleanup service” task aka “Admin - Cleanup repositories using their associated policies”  
how can we recreate it?

Thanks

---

<div class="post-metadata">

**Author:** ![mfrost](https://yyz1.discourse-cdn.com/flex047/user_avatar/community.sonatype.com/mfrost/32/1701_2.png) [@mfrost](https://community.sonatype.com/u/mfrost)\
**Post date:** [February 14, 2024, 4:32pm UTC](https://community.sonatype.com/t/how-to-add-the-default-task-cleanup-service/12082/2 "2024-02-14T16:32:45Z")

</div>

Hi @tofsaf - welcome! I believe you just need to do a server restart (per this Help doc: [Cleanup Policies](https://help.sonatype.com/en/cleanup-policies.html?_ga=2.102881600.1799868652.1707749305-1226582745.1698774557#cleanup-task-162040))

---

<div class="post-metadata">

**Author:** ![tofsaf](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@tofsaf](https://community.sonatype.com/u/tofsaf)\
**Post date:** [February 16, 2024, 6:41am UTC](https://community.sonatype.com/t/how-to-add-the-default-task-cleanup-service/12082/3 "2024-02-16T06:41:59Z")

</div>

It is so simple 🙂  
Thanks !
