I want to find unused files so I can delete them. But that does not seem possible, neither from the Admin or with graphql.
The AI documentation Assistant says that it should work with graphql. This is a response from the Assistant:
To find all unused files in Shopify (files not used in products, metafields, or metaobjects), you can use the files query with the used_in:none filter. This will return files that are not referenced by any product, metafield, or metaobject.
That would be great, but it is not true. The query below returns files used in metafields, metaobjects and blogs. I have tried with graphql versions 2025-07, 2025-10 (release candidate) and unstable.
{
files(first: 10, query: "used_in:none") {
nodes { id }
}
}
From the Admin in Content/Files you can filter for “used in: Other”. It shows references to metaobjects and metafields in products, but it does not show references for blogs or metafields in objects other than products.
How are you supposed to delete files, if you can’t know if they are used or not? Are store owners supposed to know unused files off the top of their head?
Or are you never supposed to delete files?