> ## Documentation Index
> Fetch the complete documentation index at: https://getlago.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete billable metrics

> Check the effects and restrictions before deleting a billable metric you no longer use.

Delete a billable metric when you no longer use it to measure usage. Before deleting it, review where it is used: the change affects every Plan and Contract that uses the metric for billing.

## Before you delete

A billable metric used by a [Product filter](https://getlago.com/docs/v2/guide/product-catalog/product-filters.md) cannot be deleted. Remove the Product filter before deleting the metric.

> [!WARNING]
>
> Deleting a billable metric is irreversible. Review the affected Plans and Contracts before continuing.

## What happens when you delete a metric

When you delete a billable metric, Lago:

* Removes its associated pricing and alerts, so the usage it measures is no longer billed.
* Marks draft invoices containing fees for the metric for refresh.
* Returns the deleted metric with `deleted_at` set.

## Delete the metric

> [tab] Dashboard
>
> ![How to delete a billable metric](https://mintcdn.com/lago-docs/L57i4PY_iDpAEuWL/guide/images/billable-metrics-delete-68cd9763df888a65237c8f0f5c85358a.png?fit=max\&auto=format\&n=L57i4PY_iDpAEuWL\&q=85\&s=97e5a6846e326e36d253d56e358f224f)

> [tab] API
>
> Send `DELETE /billable_metrics/{code}`, replacing `{code}` with the code of the metric you want to delete.
>
> ```bash Delete the storage metric theme={"dark"}
> LAGO_URL="https://api.getlago.com"
> API_KEY="__YOUR_API_KEY__"
>
> curl --location --request DELETE "$LAGO_URL/api/v2/billable_metrics/storage" \
>   --header "Authorization: Bearer $API_KEY"
> ```

> [card] [Filters and dimensions](https://getlago.com/docs/v2/guide/billable-metrics/filters.md)
>
> Define which groups of usage you want to measure.

> [card] [Metered products](https://getlago.com/docs/v2/guide/product-catalog/metered-products.md)
>
> Products that use the metric.

> [card] [Delete a billable metric (API)](https://getlago.com/docs/v2/api-reference/billable-metrics/delete.md)
>
> `DELETE /billable_metrics/{code}`

> [card] [Retrieve a billable metric (API)](https://getlago.com/docs/v2/api-reference/billable-metrics/retrieve.md)
>
> `GET /billable_metrics/{code}`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.