How to Clear CloudFlare’s Cache

Run this command to clear all of CloudFlare’s cache:

curl -X DELETE “” -H “X-Auth-Email:” -H “X-Auth-Key: yourglobalapikey” -H “Content-Type: application/json” –data ‘{“purge_everything”:true}’

yourzoneid is your CloudFlare’s zone ID is the email address used to login to CloudFlare
yourglobalapikey is your CloudFlare’s Global API key

You should see the response similar to this:

{ “success”: true, “errors”: [], “messages”: [], “result”: { “id”: “123d56a89f123e5678901b34567890a2” } }

If you want to clear certain file only from the cache, just run the following command:

curl -X DELETE “” -H “X-Auth-Email:” -H “X-Auth-Key: yourglobalapikey” -H “Content-Type: application/json” –data ‘{“files”:[““],”tags”:[“some-tag“,”another-tag“]}’

To find out your CloudFlare’s Zone ID, please see my previous post here.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s