---
title: Purging all content via the control panel
summary: null
url: >-
  https://www.fastly.com/documentation/guides/full-site-delivery/purging/purging-all-content
---

This guide describes how to use the _Purge all_ option to purge all content under a service via the Fastly control panel. You can also purge a single URL using the [Fastly API](https://www.fastly.com/documentation/reference/api/purging/#purge-all) and [CLI](https://www.fastly.com/documentation/reference/cli/service/purge/).

> **WARNING:** Exercise caution when purging all content from cache, especially if you're seeing an increase in [503 errors](https://www.fastly.com/documentation/guides/full-site-delivery/fastly-vcl/synthetic-errors-in-vcl). Purging all content overrides other caching-related settings that allow you to [serve stale content](https://www.fastly.com/documentation/guides/full-site-delivery/performance/serving-stale-content) and forces Fastly to retrieve that content again from your origin servers before it can be re-cached in Fastly POPs. This means that purging all content will temporarily cause your [cache hit ratio](https://www.fastly.com/documentation/guides/full-site-delivery/caching/caching-best-practices/#use-your-cache-hit-ratio-to-diagnose-potential-caching-problems) to drop dramatically and cause an associated spike of traffic to your origin servers. Be certain your origins can handle that temporary spike in traffic until the cache repopulates

## Considerations

Note the following considerations about executing a purge all:

- Purging a large amount of content from a high traffic service is likely to result in a rapid increase in traffic to origin.
- Purge all operations may take up to 2 minutes to complete. 
- Purge all is by design a [hard purge](https://www.fastly.com/documentation/guides/full-site-delivery/purging/getting-started-with-purging#soft-vs-hard-purging) and cannot be executed as a soft purge.

## Purging all content

To instantly purge all content under your service, follow the steps below:

1.   Log in to the [Fastly control panel](https://manage.fastly.com).

2.   From the [**Home**](https://manage.fastly.com/home) page, select the appropriate service. You can use the search box to search by ID, name, or domain.

3. From the **Purge** menu, select **Purge all**. The Purge all window appears and displays the service name you'll be purging.

   ![purging all of a service](/img/purge-all-example.png)

4. In the field of the **Purge all** window, confirm you want to purge all cached content on a service by entering the exact name of the service that appears (e.g., `An Example Service`).

5. Click **Purge all**.

## Troubleshooting

If purge all appears to have no effect, or if you purge all by accident, refer to the following sections.

### Dealing with race conditions

Purge all can encounter race conditions on services with shielding enabled. When shielding is enabled, a request from an end user may traverse two Fastly POPs before being forwarded to your origin server. It's possible that a request might reach a purged edge POP first, then be forwarded to a shield POP that has not yet been purged. The shield POP will deliver the cached content to the edge POP, which will cache it, resulting in the pre-purge content remaining in Fastly cache.

One solution to this race condition problem is to purge all twice, enacting the two purges around 30 seconds apart.

You can also incorporate edge logic to get around the race condition. Purge all operations cause the cache [generation](https://www.fastly.com/documentation/reference/glossary/#term-generation) value to change. This value can be added to a response at the shield POP and then compared with the local value at the edge POP. If they differ, the edge POP should not cache the response. You can find the generation value using [`req.vcl.generation`](reference/vcl/variables/miscellaneous/req-vcl-generation/) for VCL and [`FASTLY_CACHE_GENERATION`](https://www.fastly.com/documentation/reference/compute/ecp-env/fastly-cache-generation/) for Compute.

### Reverting a purge all

Because purge all works by changing a property of the service, not by modifying cached content itself, it's possible to revert by decrementing the cache generation. This operation can only be executed by a Fastly employee. If you purge all by accident, reach out to [Fastly support](https://support.fastly.com/) as soon as possible.

> **IMPORTANT:** Reverting a purge does not guarantee that all previously cached content will return. The sooner a purge is reverted, the more of the cached content will be restored.

## What's next

Explore the other purging methods available with Fastly such as [purging with surrogate keys](https://www.fastly.com/documentation/guides/full-site-delivery/purging/purging-with-surrogate-keys) and [purging a URL](https://www.fastly.com/documentation/guides/full-site-delivery/purging/purging-a-url).

## Related content

- [Purging best practices](https://www.fastly.com/documentation/guides/full-site-delivery/purging/purging-best-practices)
- [Image Optimizer purging reference](https://www.fastly.com/documentation/reference/io/#purging-images-from-the-fastly-cache)
- [Purging API documentation](https://www.fastly.com/documentation/reference/api/purging/)
