How can I bulk delete all my account's resources?

You can use the Admin API to bulk delete all of your Cloudinary uploaded resources in batches of 1000 resources per call. 
For example in PHP:

$api->delete_all_resources();

You can delete only a certain type of resources, for example - Facebook fetched profile images:

$api->delete_all_resources(array("type" => "facebook"));

When there are still more resources to go through, the next_cursor value is returned as part of the response. You can then specify this value as the next_cursor parameter of the following call. This way you can go through the full lists of your resources.
For more information, see: http://support.cloudinary.com/hc/en-us/articles/205714121-How-do-I-browse-through-all-resources-in-my-account-using-the-API-

Note that the Admin API is rate limited.

 

UPDATE: A new UI bulk delete is now available! In addition to bulk deletes via the API, you can execute a bulk deletion jobs by going to your Account's Settings page and click the Bulk delete button from the Support activities section - 

 

Bulk_delete_screen.png

Have more questions? Submit a request

Comments

  • Avatar
    achal bi

    Hi,

    I am using rails app and i have executed the below command to delete all my images. 

    Cloudinary::Api.delete_all_resources

     

    Even after deleting all images from my console I can still access these images through the previous URL. Though i cant see my uploaded images in Media library I dont see any changes in my storage size. Please help me on this.

  • Avatar
    Itay Taragano

    While the images were successfully deleted from your account, they're still cached in the CDN.

    For more information:

    http://support.cloudinary.com/entries/23310776-I-have-deleted-an-image-and-though-it-has-been-removed-from-the-media-library-it-is-still-available-

  • Avatar
    pik look

    so how about videos ?

  • Avatar
    Roee Ben-Ari

    When deleting either videos or raw files, a resource_type should be set as well. For example (in Rails):

    Cloudinary::Api.delete_all_resources(:resource_type => :video)
    
Powered by Zendesk