---
title: "Delete all merged branches"
method: DELETE
path: "/api/v4/projects/{id}/repository/merged_branches"
tags: ["branches"]
---

# Delete all merged branches

`DELETE /api/v4/projects/{id}/repository/merged_branches`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/repository/merged_branches`
- Auth: none declared

Deletes all branches that are merged into the default branch for a project.

## Path parameters

- `id` string, required

## Response `202`

202 Accepted

## Other responses

- `404`: 404 Project Not Found

---

[API](https://skmtc.dev/gitlab/apis/gitlab-api.md) - [All operations](https://skmtc.dev/gitlab/apis/gitlab-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitlab/apis/gitlab-api/revisions/b234947ef3f2?raw)
