This article explains how to use the Salesforce Data Loader to mass or bulk delete Content (ContentDocument), Files, and Libraries from a Salesforce organization. This is useful when decommissioning a library, cleaning up unused content, or performing a bulk data maintenance operation.
Important: Salesforce recommends performing a full data export backup using the Salesforce Data Export feature before deleting any records. Data Loader cannot be used to export the actual files.
Make sure the "Query All Files" permission is enabled for your user. This permission is not automatically enabled even for System Administrators. If it is not enabled, all Content records will not be visible to you. See steps to enable the Query All Files permission.
Note: Deleting a ContentDocument record automatically deletes all related ContentVersion records as well.
Once the content within a library has been deleted, navigate to the Library in your org to delete it.
Download and Install Data Loader
Delete, Archive, and Restore Content
000387186

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.