---
title: "Delete a CodeQL database"
method: DELETE
path: "/repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
tags: ["code-scanning"]
---

# Delete a CodeQL database

`DELETE /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`

Deletes a CodeQL database for a language in a repository.

OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

## Path parameters

- `owner` string, required
- `repo` string, required
- `language` string, required

## Response `204`

Response

## Other responses

- `403` — Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
- `404` — Resource not found
- `503` — Service unavailable

---

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