TL;DR
settings_data.jsonstores theme settings and app blocks in Shopify Online Store 2.0- On app uninstall, app block entries usually persist — dead code
- Manual editing is risky: a syntax error breaks the entire theme editor
- Safe cleanup: via tool with JSON-parse + string fallback (e.g. GhostCode)
What is settings_data.json?
Since Online Store 2.0 (released June 2021), Shopify stores theme settings in structured JSON. The file lives at /config/settings_data.json in the theme code.
Content: theme-wide settings (colors, fonts), section settings, app block entries per template. Each app block has a unique ID matching shopify://apps/{app-handle}/blocks/{block-type}/{hash}.
What happens on app uninstall?
On uninstall:
- Shopify revokes the app's API access
- App blocks in the theme editor are marked "disabled"
- JSON entries in
settings_data.jsonremain unchanged
Result: your theme contains dozens of dead app block references for apps that are long gone.
Concrete risks
Broken theme editor. Sometimes dead app blocks are so orphaned that the Shopify theme editor cannot render them and crashes. The merchant sees an error page in admin — frustrating.
Performance. Even dead app blocks are loaded during JSON parsing. Stores with 30+ app blocks easily carry 50+ KB of JSON on every theme render.
Migration problems. On theme switch (Dawn → Sense), dead app blocks often get copied and make the new theme dirty from day 1.
Why manual editing is dangerous
The JSON structure is complex and nested. Example:
{
"current": {
"sections": {
"product-form": {
"blocks": {
"shopify://apps/judge-me/blocks/reviews/abc123": {
"type": "@app",
"settings": {}
}
},
"block_order": ["shopify://apps/judge-me/blocks/reviews/abc123"]
}
}
}
}
To remove an app block you must:
- Delete the entry in
blocks - Remove the ID from
block_ordertoo - Adjust commas correctly (trailing comma = syntax error)
- Not accidentally remove structures like "settings"
One wrong comma = JSON invalid = theme editor breaks.
The safe way — with safe-parse
Professional tools like GhostCode use a two-stage approach:
Stage 1: JSON.parse
Normal parsing, targeted removal of app block entries, then JSON.stringify back. Works for clean JSON.
Stage 2: string fallback If JSON.parse fails (e.g. due to accidentally introduced manual change), a brace-counting algorithm kicks in. It finds the boundaries of the target block and removes it string-based, independent of JSON structure.
Result is atomic: either the block is gone and JSON is still valid, or the operation aborts and backup remains.
Tips if you try manually
- Backup first: Shopify admin → Themes → Actions → Duplicate
- Use JSON linter: run
jsonlint.comafter every change - Identify app handle:
shopify://apps/{handle}/— only remove{handle}-specific blocks - Test in dev theme: changes in duplicated theme first, not live
- Rollback plan: on error, immediately switch back to backup theme
What GhostCode does differently
- Asset API exemption from Shopify permits direct theme writes (most scanners can only read)
- Automatic backup before every cleanup (90 days)
- One-click restore if something goes wrong
- 200+ app patterns detected automatically
- Safe-parse + string fallback combined — safer than manual
Effort: 30-second scan, 1-click cleanup, done.
Further reading: Clean Shopify Theme: 12 Steps · Remove Ghost Code · App Uninstalled — Remove Code