Uninstalling a Shopify app is not the same as removing it from the theme. I've opened more than one store where an app that was "uninstalled" six months ago was still firing a 180kb vendor script on every PDP load. The admin panel said the app was gone. The theme said otherwise.
This is the incident pattern I've cleaned up on three different stores. The explanation of what actually happens when you click "Uninstall," what stays behind, and the grep-based checklist to remove the artifacts cleanly.
What "Uninstall" actually does
When you click Uninstall in the Shopify admin, the platform does three things:
- Revokes the app's OAuth access token.
- Stops billing.
- (Sometimes) disables App embed blocks that the app registered.
It does not remove:
- Liquid snippet files the app wrote into your theme (
snippets/app-*.liquid) - JavaScript and CSS files the app uploaded to
assets/ - Hardcoded
<script>tags in yourtheme.liquidthat the app asked a developer to add - Webhooks registered through Shopify Notifications settings
- Customer-account portal links pointing at the app's former URL
- Theme sections or blocks that the app modified to work
On a theme that's seen apps come and go for three years, the cleanup debt compounds. This is exactly the pattern that creates the bloat in most DTC brands run twice the apps they actually need.
The incident that tells the pattern
The pattern: a brand ran a page-weight audit (the method from Shopify app page weight audit) and found their PDP was 400kb heavier than it should have been. The developer team checked installed apps. The installed list was short and reasonable.
Then we grepped the theme. Two vendor scripts were loading from CDNs belonging to apps that had been uninstalled in 2024. The theme had hardcoded <script> tags in theme.liquid and nobody had cleaned them up. The scripts were still loading on every page.
The fix was a 20-minute theme commit. The damage had been running for 18 months.
The checklist
Eight steps. About 30 minutes per app if the theme is reasonably clean, longer if it's been through many rounds.
1. Disable the App embed block in theme customizer
Before uninstalling the app from the admin, go to the theme customizer, open the sidebar's "App embeds" section, and turn off everything registered by that app. This is the only native Shopify mechanism that cleanly removes the app's script injection.
2. Remove Liquid snippet files
ls snippets/ | grep -i vendor-name
Look for any snippet named app-*.liquid or prefixed with the vendor's brand. Delete after confirming nothing references them.
3. Clean section and block overrides
Some apps modify sections or blocks rather than injecting separate snippets. Grep for the vendor's class names or data attributes across sections/:
grep -r "data-vendor-app" sections/
grep -r "vendor-widget" sections/
Remove the injected markup. This is where reviews apps and loyalty badges leave the most residue.
4. Remove orphan JavaScript assets
ls assets/ | grep -iE "(vendor|app)\.(js|min\.js)"
Delete any JS files owned by the uninstalled app. Be cautious about generic names; confirm file contents before deleting.
5. Remove orphan CSS files
Same process for CSS files. Orphan CSS is less harmful than orphan JS (no execution cost), but it still adds weight if anything is referencing it.
6. Remove hardcoded <script> tags in theme.liquid
This is where the persistent orphans live. Grep for every external <script> tag in theme.liquid:
grep -n "<script" layout/theme.liquid
Review each one. Any pointing at a vendor CDN for an uninstalled app should go.
7. Remove webhooks
Shopify admin → Settings → Notifications → Webhooks. Any webhook URL pointing at the uninstalled vendor's domain should be deleted. Orphan webhooks don't break anything, but they retry against dead endpoints and pollute your app logs.
8. Update customer account portal links
grep -r "app.vendor.com" templates/customers/
grep -r "/tools/vendor-portal" templates/
Any customer-facing link pointing at the uninstalled app's customer portal needs to be either removed or redirected. This is particularly important for subscriptions apps like Recharge. The Recharge to Shopify Subscriptions migration playbook has the specific pattern for that vendor.
The meta checklist: before you uninstall anything
Run this before hitting Uninstall in the admin:
- Screenshot every App embed block that's active. You may need to reconstruct which one came from which app.
- Export any data the app owns (reviews, customer notes, custom fields, segment definitions).
- Note webhook URLs before they disappear.
- Note customer-facing URLs that will break (subscription portals, reviews pages, loyalty dashboards).
This is cheap insurance. 15 minutes of prep saves a day of reverse-engineering.
“The admin panel says the app is gone. The theme says otherwise. That gap is where the bloat lives.
”
Why this matters beyond page weight
Three non-obvious reasons:
- Security. An orphan script from an uninstalled app still executes. If the vendor was compromised or their CDN was attacked, your store runs the malicious code.
- Compliance. Orphan tracking scripts violate consent even when the app is uninstalled. If an EU visitor hits the PDP and an orphan tracker fires, the compliance exposure persists.
- Analytics noise. Orphan scripts can still fire analytics events, corrupting your data.
This is why the DTC Stack Audit includes a theme-cleanup module. The gap between "uninstalled" and "actually removed" is bigger than most operators realize.
For the broader app-stack context, see the Shopify app stack hub.
Why doesn't Shopify fully remove apps when you uninstall them?
Shopify does remove the app's access token and stop its billing, but the theme is merchant-owned. Shopify can't safely modify merchant theme code because the app could have requested custom integrations, hardcoded scripts, or edited sections that the merchant doesn't want reverted. The tradeoff is that cleanup is the merchant's responsibility.
How much page weight can orphan scripts add?
I've seen cases of 400kb of orphan scripts loading on the PDP, and the brand had no idea. More typically, 100 to 300kb across two or three orphaned apps. This is enough to shift Core Web Vitals scores on mobile, especially on Largest Contentful Paint.
Can I use a tool to automate the cleanup?
Partially. Some theme-audit tools will flag orphan snippets and scripts. Shopify's built-in theme check doesn't catch vendor artifacts. For a thorough cleanup, a manual grep pass is still the reliable method. It takes 30 minutes per app on a moderately clean theme.
What if I don't know which app a script belongs to?
Check the CDN or domain the script loads from. Most vendor scripts load from a subdomain that identifies them (for example, cdn.vendor-name.com). If you can't identify it, inspect the script: the first 50 lines usually have a vendor name in a comment or a global variable. If still unclear, disable it in staging and watch for broken functionality before removing permanently.
Should I clean orphan scripts after every app uninstall?
Yes. The cleanup takes 20 to 30 minutes and prevents compounding debt. On a theme that's seen 20 apps come and go over three years, running cleanup each time keeps the theme manageable. Deferring cleanup is how a theme ends up with 500kb of unexplained orphan weight.
Sources and specifics
- Patterns observed on mid-market DTC themes where app churn has been happening for multiple years.
- Page-weight impact estimates reflect typical orphan-script sizes; actual impact varies.
- Shopify's uninstall behavior documented in their Developer docs on App uninstall and webhook management.
- For the broader audit method, see the Shopify app page weight audit and the Shopify app stack hub. The full audit is packaged in the DTC Stack Audit product.
