How to Remove Leftover App Code From a Shopify Theme (2026)
Uninstalling a Shopify app does not always remove everything the app added to your theme, and what is left can still load scripts on every page. The fix is manual but safe if you do it on a duplicate theme, one reference at a time, and test before you publish.
This guide shows how to find that code, remove it, and check the result. If you would rather hand it over, App369 does this as part of its fixed-price Shopify Speed & Checkout Tune-Up. For the rest of the speed picture, see the Shopify speed checklist.
Why code stays behind
Apps can add things to a store in a few different ways, and they clean up differently:
- Theme app extensions. Shopify's theme app extension docs say apps built this way don't edit theme code. They add app blocks and app embeds that you manage in the theme editor. The docs I read do not spell out what happens to these on uninstall, so check the editor after removing an app instead of assuming. App embeds are listed under Theme settings > App embeds, and a disabled embed stays recorded in
settings_data.json. - Script tags. A ScriptTag loads remote JavaScript on storefront pages. Shopify says script tags can only be used with vintage themes.
- Edits to theme files. Shopify's help center notes that some apps inject code directly into your theme's code. Apps that did this, or snippets pasted in by hand or by a developer, are the usual source of leftovers: a
<script>intheme.liquid, a snippet file, a stylesheet, or a{% render %}line inside a section.
Newer apps tend to use extensions, older ones tend to leave files behind. If your theme has been customized for years, expect a mix.
Step 1: Duplicate the theme and back it up
Do not edit your live theme. In Online Store > Themes, duplicate it. Shopify's duplicate theme help page describes duplicating as making a backup copy of a theme you want to customize. Also download a copy of the theme files as a second backup. Then do all edits in the duplicate and preview it before publishing.
Step 2: Make a list of what should be gone
Write down every app you uninstalled, plus the services they connected to, for example a reviews tool, a popup tool or a chat widget. Each app usually has a help page with uninstall instructions. Read it first. Some apps tell you exactly which snippets to delete.
Step 3: Find the leftovers
Search the code. In the duplicate theme, open Edit code and use the search for each app's name and its company name. Check these places:
layout/theme.liquid: script and link tags pointing at the vendor's domain, plus{% render %}or{% include %}lines for app snippets.- The
snippetsfolder: files named after the app. sectionsandtemplates: render lines for those snippets.assets: app-named JavaScript and CSS files.config/settings_data.json: leftover app settings. Leave this file alone unless you are sure about what you are editing.
Check the theme editor. Open Customize, then Theme settings > App embeds, and look at the enabled ones. Also scan page sections for app blocks you no longer use.
Use your browser as a witness. Open your store in Chrome, open DevTools > Network, reload, and filter by "JS". Sort by domain. Any request to a domain belonging to an app you removed is a leftover loading from somewhere. Click the request and read its Initiator column, which points to the file that triggered it. Look at the Elements tab too: an element with an app's class name may still be on the page.
Step 4: Remove it carefully
- Remove the reference, then the file. Deleting a snippet while a
{% render 'snippet-name' %}still calls it can cause a Liquid error on the page. Delete the call first, save, preview the pages, then delete the unused snippet or asset. - One change at a time. Save and preview after each removal, so if something breaks you know which edit did it.
- Do not touch what you cannot identify. Code that mentions your payment gateway, analytics, or theme itself might still be needed. If it is unclear, leave it and ask the app's support or your developer.
- Keep a log. Write the file and line you changed. It makes rollback trivial.
Step 5: Test before publishing
On the duplicate, preview these pages on mobile: home, a collection, a product page, the cart, and the start of checkout. Test add to cart, any popup or widget you thought you removed, and your own forms. Look for missing images, layout jumps or console errors in DevTools. When all of it works, publish the duplicate yourself, and keep the old theme for a few days.
Step 6: Measure before and after
Run PageSpeed Insights or Lighthouse in Chrome DevTools on the same URLs before and after, on mobile. Lighthouse results vary from run to run, so run each a few times and compare medians. Removing a leftover script often helps, but how much depends on the script and the page, so treat the result as something to measure, not to expect.
When to get help
To get the list of scripts quickly, paste your store's page source into the free Shopify app script checker. It groups third-party hosts, ScriptTag apps and app embeds, and flags render-blocking scripts.
Leftover code is a manual job, and the risk is breaking something while you are hunting for it. If you do not want to edit theme files, App369's Shopify Speed & Checkout Tune-Up is $750 fixed price, delivered 5 business days after collaborator or staff access (Themes and Apps only) is granted. The work happens on a duplicate theme with a log of every edit, and you review and publish it yourself. No score or conversion lift is guaranteed. Simon builds and runs Workspace369, a production Flutter and Firebase SaaS, and brings the same measure-first approach to store work.
Frequently Asked Questions
Does uninstalling a Shopify app remove its code from my theme?
Not always. Apps built with theme app extensions don't edit theme code, but apps that injected code into theme files, or had snippets added by hand, can leave files and references behind. Check the theme code and the theme editor after uninstalling.
How do I find leftover app code in my Shopify theme?
Duplicate the theme, search Edit code for the app's name and domain, check theme.liquid, the snippets and assets folders, and the App embeds panel. Then use DevTools' Network tab to spot requests to the removed app's domain.
Can leftover app code slow down my Shopify store?
It can, if it still loads scripts or styles on your pages. Measure with PageSpeed Insights before and after, and keep in mind the effect depends on the script.
Is it safe to delete snippets in my Shopify theme?
It is safe if you work on a duplicate theme, remove the {% render %} call before the snippet file, and preview afterwards. Keep a backup of the theme and a log of each edit.
How do I check for leftover code after uninstalling an app?
Reload your store with DevTools > Network open and look for requests to the app's domain, then search your theme code for the app's name. Also read the app's own uninstall instructions.
Want this done at a fixed price?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
Related Resources
Related Articles
How to Remove Leftover App Code From a Shopify Theme (2026)
Uninstalled a Shopify app but scripts still load? How to find leftover app code in your theme, remove it safely on a duplicate theme, and measure the result.
Read more →Shopify Speed Checklist: Faster Mobile Pages and Checkout (2026)
A practical checklist for a faster Shopify store on mobile: measure Core Web Vitals, fix images, leftover app code, fonts and Liquid, and remove friction between cart and checkout.
Read more →