---
title: CLEAR CACHE
description: Remove all cached tables and views from Apache Spark cache with CLEAR CACHE in Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-cache-clear-cache
---

# CLEAR CACHE

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

To learn more about query caching in Databricks SQL instead, see [Query caching](https://docs.databricks.com/aws/en/sql/user/queries/query-caching.md).

Removes the entries and associated data from the in-memory and/or on-disk cache for all cached
tables and views in Apache Spark cache.

## Syntax

```
> CLEAR CACHE
```

See [Compare the disk cache and the Spark cache](https://docs.databricks.com/aws/en/optimizations/disk-cache.md#spark-cache) for the differences between disk caching and the Apache Spark cache.

## Examples

```sql
> CLEAR CACHE;
```

## Related statements

* [CACHE TABLE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-cache-cache-table.md)
* [UNCACHE TABLE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-cache-uncache-table.md)
* [REFRESH TABLE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-cache-refresh-table.md)
* [REFRESH CACHE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-cache-refresh.md)
* [REFRESH FUNCTION](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-cache-refresh-function.md)
