---
title: "Delete a reference"
method: DELETE
path: "/repos/{owner}/{repo}/git/refs/{ref}"
tags: ["git"]
---

# Delete a reference

`DELETE /repos/{owner}/{repo}/git/refs/{ref}`

Deletes the provided reference.

## Path parameters

- `owner` string, required
- `repo` string, required
- `ref` string, required

## Response `204`

Response

## Other responses

- `409` — Conflict
- `422` — Validation failed, an attempt was made to delete the default branch, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/rest-api.md) · [All operations](https://skmtc.net/github/apis/rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/rest-api/versions/80850db290cd/schema)
