---
title: Delete Logs with Sensitive Data
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Log Management > Logs Guides > Delete Logs with Sensitive Data
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Delete Logs with Sensitive Data

## Overview{% #overview %}

Deleting logs that contain sensitive data reduces the risk of exposing that data. This guide provides information on how to:

- Check if the logs with sensitive data need to be deleted because they are within the retention period.
- Make logs with sensitive data un-queryable.
- Redact sensitive data with Sensitive Data Scanner.
- Delete logs with Logs Data Deletion.

## Check your log retention period{% #check-your-log-retention-period %}

Datadog automatically deletes logs that exceed the longest retention period for your organization.

To check or change your log retention period:

1. Navigate to the [Log Indexes](https://app.datadoghq.com/logs/pipelines/indexes) page.
1. See the log retention period for each index in the Retention column.
1. If you want to make logs age out faster, click the Edit icon on the right side of the index.
1. Update the **Set Index Retention** dropdown menu to a new retention period.

## Make logs with sensitive data un-queryable{% #make-logs-with-sensitive-data-un-queryable %}

If logs within the retention period contain sensitive data, you can make them un-queryable until they age out. Un-queryable logs don't appear in the Log Explorer, Dashboards, or Live Tail. Follow these [instructions](https://docs.datadoghq.com/logs/guide/manage-sensitive-logs-data-access.md#make-sensitive-logs-un-queryable-in-datadog-until-they-age-out) to make logs with sensitive data un-queryable in Datadog.

## Delete an entire index{% #delete-an-entire-index %}

To delete an entire index:

1. Navigate to the [Log Indexes](https://app.datadoghq.com/logs/pipelines/indexes) page.
1. Click the Delete icon on the right side of the index you want to delete.
1. Click Confirm to delete the index.

## Redact sensitive data with Sensitive Data Scanner{% #redact-sensitive-data-with-sensitive-data-scanner %}

Use [Sensitive Data Scanner](https://www.datadoghq.com/product/sensitive-data-scanner/) to limit the risk of storing sensitive data in Datadog. Sensitive Data Scanner is a stream-based pattern matching service used to identify, tag, and optionally redact or hash sensitive data. Security and compliance teams can implement Sensitive Data Scanner to prevent sensitive data leaks and limit non-compliance risks.

## Delete logs from your organization{% #delete-logs-from-your-organization %}

To permanently remove indexed logs that contain sensitive data, use [Logs Data Deletion](https://docs.datadoghq.com/account_management/delete_data.md). Logs Data Deletion lets you query for logs within a time frame and delete them from your organization without contacting Datadog support.

Before you delete logs, confirm the following:

- You've stopped sending the logs that contain sensitive data to Datadog.
- Logs Data Deletion is [enabled for your organization](https://docs.datadoghq.com/account_management/delete_data.md#enable-deletion-feature). Only an Organization Admin can enable it.
- You have a role with the Logs Delete Data permission.

{% alert level="danger" %}
Deletions are permanent after 10 days. Review each deletion request before you confirm it.
{% /alert %}

**Note**: Logs Data Deletion doesn't delete data derived from the deleted logs, such as generated metrics.

For the full procedure, including how to cancel and audit deletions, see [Delete Data](https://docs.datadoghq.com/account_management/delete_data.md).

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Manage sensitive logs data access](https://docs.datadoghq.com/logs/guide/manage-sensitive-logs-data-access.md)
- [Sensitive Data Scanner](https://docs.datadoghq.com/security/sensitive_data_scanner.md)
- [Delete data](https://docs.datadoghq.com/account_management/delete_data.md)
