I have a couple of orgs where they are running over their file storage limits. There are a lot of old files that need to be removed, but I'm struggling to get a view/report/query together that will clearly indicated against which records these files are being stored.

The problem is exacerbated by the fact that they are littered through the system. There are uploads via their community, by email-to-case, by marketing emails, etc.

In one case, there are around 120GB of file in storage, but when I run a report on Content, Files, and Attachments, I can only see around 2.5GB worth of files being reported.

Is there anyone who has managed to audit file usage/location etc, so that the excesses files can be deleted/removed/archived?

1 Answer 1


There is an authorization called "Query All Files". You could try to activate it for your user profile and see if more files pop up in the report.

If they are not being shown in the report, you will need to query them. You can do this with dataloader: https://help.salesforce.com/s/articleView?id=000336155&type=1

One of the fields that you can query is the ContentSize. Also there are fields like OwnerId and ParentId that will give you information about where the file is associated with. Do note that in Salesforce Files, files can be associated with multiple records/chatter groups/etc so it might not alway be clear where a file is located.

Also keep in mind that you will probably not be able to delete files that you don't have access to. So if those need to be deleted, you need to reach out to the file owners.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .