My QA users have overfloaded the Developer Sandbox with 234 MB of files. I try to wipe all the content, however, looks like SOQL query doesn't return all the files even though I can see them in UI. I need to query content document which are shared with the current user on UI but not shared with the current user on the SOQL. How can I achieve that and wipe the content on the sandbox?
I tried to use the following code
List<ContentDocument> content = [select id from ContentDocument WHERE ContentAssetId = null];
delete content;
Database.emptyRecycleBin(content);
However, it didn't help to wipe content.
Also, if I try to use USING SCOPE
optional clause with allPrivate
Select Id, Title From ContentDocument USING SCOPE allPrivate
it fails with an error
[INVALID_QUERY_SCOPE] Invalid query scope: allPrivate