---
title: "Platform CDN: Manually purging the CDN Cache"
date: "2022-03-08T00:35:03+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/94426-platform-cdn-manually-purging-cdn-cache"
id: "63d89a43-a222-40d5-bb8c-d6ec1d1d3c36"
---

Manually purging all caches or individual objects from Platform CDN

**Important Note**: These instructions clear content from Platform CDN only. In order to replace it with fresh content, ensure that the content has also been purged from Acquia Varnish first.  
  
First step: Retrieve the service\_id and token

Run the following commands to SSH into your environment and use Drush to retrieve the service\_id and token:

    ssh sitename.environment@sitenameenv.ssh.prod.acquia-sites.com

Your SSH URL can be found in your Acquia Environment Information Section in the [Cloud UI](https://cloud.acquia.com/).

Run the following command to retrieve your Platform CDN Credentials:

Drupal 7

    drush8 @sitegroup.env vget acquia_service_credentials

Drupal 8/Drupal 9

    drush9 @sitegroup.env ev 'print_r(\Drupal\Core\Site\Settings::get("acquia_service_credentials")["platform_cdn"]["configuration"]);'

  
The output will be similar to the following:

    {
       {
          "service_id": "1MFG0lmpFvMCoiziPbKLBB",
          "token": "NFA6ZgZaQfC1u1117WJuu3cVbf0ChlDY"
       }
    }

Second step: Purge Platform CDN   
Purge Platform CDN by running one of following curl commands with the token in the header and the service\_id in the URL path as shown in the following example:

Purge whole domain

    curl -X POST -H "Fastly-Key:<Platform CDN Token>" -H "Accept: application/json" https://api.fastly.com/service/<Platform CDN Service ID>/purge/[DOMAIN]

Purge by tag

    curl -X POST -H "Fastly-Key:<Platform CDN Token>" -H "Accept: application/json" https://api.fastly.com/service/<Platform CDN Service ID>/purge/[TAG]

Purge everything

    curl -X POST -H "Fastly-Key:<Platform CDN Token>" -H "Accept: application/json" https://api.fastly.com/service/<Platform CDN Service ID>/purge_all

For example:

    curl -X POST -H "Fastly-Key:NFA6ZgZaQfC1u1117WJuu3cVbf0ChlDY" -H "Accept: application/json" https://api.fastly.com/service/1MFG0lmpFvMCoiziPbKLBB/purge_all

Before manually purging the Platform CDN cache, purge your Varnish cache to ensure cache consistency. For more information, visit Varnish: [Bypassing the cache](/acquia-cloud-platform/help/92381-varnish-bypassing-cache "Varnish: Bypassing the cache").