- Get Started
- Image & Video APIs overview
- Developer kickstart
- SDK quick starts
- Try it!
- MCP servers and LLM tools (Beta)
- VS Code Extension (Beta)
- Video tutorial library
- Programmatic asset management
- Programmatic upload
- Upload programmatically
- Create upload presets
- Auto upload
- Moderate images with AI
- Use AI to generate image captions
- Upload images in Flutter
- Upload images in Node.js
- Auto-tag images in Node.js
- Upload multiple files in Node.js
- Upload videos in Node.js
- Upload images in Python
- Auto-tag images in Python
- Upload videos in Python
- Upload images in PHP
- Upload images in Go
- Upload assets in a React app
- Upload assets in a Vue.js app
- Drag-and-drop uploads in React
- Upload assets in a Next.js app
- Upload assets with Server Actions
- Upload assets in Svelte
- Upload assets in a SvelteKit app
- Upload assets in a Remix app
- Upload images in Hono
- Use webhooks to remove backgrounds
- Upload images in Laravel
- Interaction with Cloudinary APIs
- Cloudinary SDKs
- Find your credentials
- Configure the JavaScript SDK
- Configure the React SDK
- Configure the Angular SDK
- Configure the Flutter SDK
- Configure Svelte Cloudinary
- Configure the Javascript SDK in Svelte
- Getting started with Cloudinary in Node.js
- Configure the Node.js SDK
- Configure the Python SDK
- Configure the PHP SDK
- Configure the Go SDK
- Configure the Vue.js SDK
- Configure the Next.js SDK
- List images in Next.js
- Lazy load images with Next.js
- Image fallbacks in JavaScript
- Captioning on upload with Node.js
- Delete assets with Node.js
- Manage images in a Django app
- Cloudinary CLI
- Widgets and tools
- Programmatic upload
- Optimization and delivery
- Transformations
- Get started with transformations
- Advanced transformation features
- Text overlay transformations
- Complex transformations
- Named transformations
- Named transformations using TX Builder
- Advanced image components
- Trim videos in Node.js
- Splice videos in Node.js
- Zoompan effect
- Video transformations
- Crop and resize images in React
- Crop and resize videos in React
- Crop and resize images in Python
- Remove backgrounds and add drop shadows
- AI generative fill in Next.js
- Color accessibility in JavaScript
- Transformations for social media
- Dev Hints on YouTube
- Dev Hints en Español
- Cloudinary Café Training Sessions
- Programmatic asset management
- Additional onboarding resources
- Guides
- Cloudinary Image
- Product overview
- Image transformations
- Image transformations overview
- Resizing and cropping
- Placing layers on images
- Effects and enhancements
- Background removal
- Generative AI transformations
- Face-detection based transformations
- Custom focus areas
- Transformation refiners
- Animated images
- Transformations on 3D models
- Conditional transformations
- User-defined variables and arithmetic transformations
- Custom functions
- Image optimization and delivery
- Programmatic image creation
- Product Gallery widget
- Media Editor widget
- Image add-ons
- Cloudinary Video
- Upload
- Asset management
- Account management
- Retail and e-commerce
- User-generated content
- Accessible media
- AI in action
- Native mobile
- Add-ons
- Advanced Facial Attributes Detection
- Amazon Rekognition AI Moderation
- Amazon Rekognition Video Moderation
- Amazon Rekognition Auto Tagging
- Amazon Rekognition Celebrity Detection
- Aspose Document Conversion
- Cloudinary AI Background Removal
- Cloudinary AI Content Analysis
- Cloudinary AI Vision
- Cloudinary Duplicate Image Detection
- Google AI Video Moderation
- Google AI Video Transcription
- Google Auto Tagging
- Google Automatic Video Tagging
- Google Translation
- Imagga Auto Tagging
- Imagga Crop and Scale
- Perception Point Malware Detection
- Microsoft Azure Video Indexer
- OCR Text Detection and Extraction
- Pixelz - Remove the Background
- URL2PNG Website Screenshots
- VIESUSTM Automatic Image Enhancement
- WebPurify Image Moderation
- Cloudinary Image
- References
- SDKs
- Release Notes
Delete assets with the Node.js SDK (video tutorial)
Last updated: Nov-24-2025
Overview
In this tutorial, you'll learn about the different ways to delete your resources from Cloudinary, including a deep dive into the Node.js SDK methods.
To follow along with the tutorial, clone the delete-assets-node GitHub repo and see the instructions in the README.
Video tutorial
This video is brought to you by Cloudinary's video player - embed your own!
Use the controls to set the playback speed, navigate to chapters of interest and select subtitles in your preferred language.
Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
Delete assets using the Console
| Jump to this spot in the video 0:00 | There are many ways to delete assets from Cloudinary. In the Cloudinary Console, you can delete individual or multiple assets from your Media Library, or, in the Settings, you can bulk delete many assets based on various criteria. |
Delete assets using the Node.js SDK
| Jump to this spot in the video 0:56 | As deleting assets is a backend operation, you need to set your Cloudinary API environment variable, which you can copy from the Dashboard page in the Cloudinary Console. Paste it into a .env file, but don't submit this to version control as it contains your API secret, which should never be exposed. |
Delete one asset at a time
| Jump to this spot in the video 1:17 | To delete one asset at a time, you can use the destroy method of the upload API. Pass in the public ID of the asset to delete. If you don't pass in any other parameters, it is assumed that the asset is an image of delivery type 'upload'. |
Delete an authenticated video
| Jump to this spot in the video 2:06 | If the asset you want to delete is not an image or of delivery type 'upload', you need to include the resource_type and/or type parameters. For example, to delete an authenticated video: |
Invalidate the cache
| Jump to this spot in the video 2:25 | Even if you delete assets from your product environment they may still be accessible if they have been delivered and are cached on the CDN. To invalidate the cache, specify invalidate: true. |
Delete multiple assets at a time
| Jump to this spot in the video 2:52 | To delete more than one asset at a time, use one of the delete resources methods of the admin API. Use the delete_resources method if you know the public IDs of the assets you want to delete. |
Delete images by public ID prefix
| Jump to this spot in the video 3:16 | If all the assets you want to delete have public IDs that follow a convention (start with the same prefix), you can use the delete_resources_by_prefix method. For example, to delete all images of type 'upload' that have a public ID starting docs/: |
Delete authenticated videos by public ID prefix
| Jump to this spot in the video 3:38 | To delete authenticated videos by public ID prefix, set the resource_type to video and type to authenticated as before: |
Delete authenticated images by public ID prefix
| Jump to this spot in the video 3:53 | To delete authenticated images by public ID prefix, set the type to authenticated. There's no need to set resource_type to image as that's the default. |
Delete all assets of a particular type
| Jump to this spot in the video 4:10 | Use the delete_all_resources method to delete all assets matching a particular asset type and delivery type. For example, to delete all Facebook images: |
Delete all assets with the same tag
| Jump to this spot in the video 4:35 | Use the delete_resources_by_tag method to delete all assets that have the specified tag. By default, all images are deleted regardless of their delivery type. To delete videos, set the resource_type to video (as in the next example). |
Delete only derived versions of assets
| Jump to this spot in the video 5:09 | You can delete only the derived versions of assets and keep the original intact, by setting the keep_original parameter to true. |
Delete specific derived versions of assets
| Jump to this spot in the video 5:35 | The resource method returns details of derived versions of assets. You can use the IDs returned for each of the derived versions in the delete_derived_resources method to delete only those versions. |
Keep learning
- Take our free self-paced Introduction for Node.js Developers course in the Cloudinary Academy.
- Learn more about deleting assets.
- Find out how to restore deleted assets from backup.
- Discover what else you can do with the Cloudinary Node.js SDK.
If you like this, you might also like...
Check out the Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.