# Sonar cloud older prs and branches delete

**URL:** <https://community.sonarsource.com/t/sonar-cloud-older-prs-and-branches-delete/48643>\
**Category:** SonarQube Cloud\
**Tags:** sonarqube-cloud\
**Created:** [August 25, 2021, 4:07am UTC](https://community.sonarsource.com/t/sonar-cloud-older-prs-and-branches-delete/48643 "2021-08-25T04:07:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![revant](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/revant/32/41254_2.png) [@revant](https://community.sonarsource.com/u/revant)\
**Post date:** [August 25, 2021, 4:07am UTC](https://community.sonarsource.com/t/sonar-cloud-older-prs-and-branches-delete/48643/1 "2021-08-25T04:07:20Z")

</div>

Hi Team,

Is there a way to delete older PRs and branches on sonar cloud through programatically?or do we have any parameters to pass ?

Thanks,  
Revanth

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [August 30, 2021, 6:04pm UTC](https://community.sonarsource.com/t/sonar-cloud-older-prs-and-branches-delete/48643/2 "2021-08-30T18:04:08Z")

</div>

Hey there.

Short-lived branches (and pull requests) are purged after 30 days of no analysis (triggered by a new analysis of the SonarCloud project. [This is documented as customisable](https://sonarcloud.io/documentation/enriching/branch-setup/#branch-lifetimes) but I think that’s not true anymore on SonarCloud (I’ll ping our docs guru)!

For any other use-cases there is, of course, the [Web API](https://sonarcloud.io/web_api). Particularly [**POST api/project\_pull\_requests/delete**](https://sonarcloud.io/web_api/api/project_pull_requests/delete) and [**POST api/project\_branches/delete**](https://sonarcloud.io/web_api/api/project_branches/delete) are probably interesting to you.
