find unused
how it works
Lists the sections, snippets and assets in a Shopify theme that nothing references, so you can delete them with some confidence. The folder never leaves your machine: every file is read in the browser and nothing is uploaded.
Using it
- Pull the theme locally, so you have its folder on disk.
- Hit upload folder and pick the theme root, the folder that holds sections/, snippets/ and assets/.
- Anything with no reference is listed out. Click a result to copy its path, for example sections/hero.liquid.
What it reads
| Path | Treated as |
|---|---|
| sections/*.liquid | a candidate section, one entry per file |
| snippets/*.liquid | a candidate snippet, one entry per file |
| assets/* | a candidate asset, one entry per file |
References are found by scanning every text file in the theme, not just JSON: quoted names; {% render %}, {% include %} and {% section %} tags, including the brace-less form inside a {% liquid %} block; JSON "type" values in templates, config and section groups; asset filters like asset_url, image_url, stylesheet_tag and script_tag; plain filenames written out in CSS and JS; and the Section Rendering API, ?section_id= and ?sections=, including inside a JS template literal. A reference to foo.css also counts for foo.css.liquid, since Shopify compiles one down to the other.
Check before deleting
The one case source cannot resolve is a name assembled while the page runs, because the finished name is never written down anywhere. The scan lists every file that does this under could hide a reference, and these are the three shapes to look for when you open them.
| What you will see | What it can be hiding |
|---|---|
| {{ 'icon-' | append: type | asset_url }} | every asset whose name starts with icon-. If type is a product type, the theme may be reaching for dozens of files that appear nowhere in the source. |
| {% render block.type %} | any snippet named after a block type. The give-away is that the name is a variable rather than a quoted string, so there is nothing to match on. |
| fetch(`?section_id=${name}`) | any section pulled in over the Section Rendering API. A quoted id is matched, but one built from a variable cannot be. |
Trace the variable back to the values it can hold, and check whether any of them name something in the results. The scan is deliberately biased toward calling a file used, so a listed result is very likely genuinely unused, but a page builder or an installed app is the case that earns a second look. Validated against 173 real Shopify themes with no missed references.