Why uninstalled apps leave code behind
Shopify's Help Center describes three ways an app can extend a theme: as an app block you place in a section, as an app embed that floats over the page or adds code customers never see, or by injecting code straight into the theme's files. The first two are delivered through theme app extensions, and Shopify's developer documentation says that when an app is uninstalled, the blocks associated with it are automatically and entirely removed from the theme.
The third route is where the debris comes from. Shopify's own guide to moving apps onto theme app extensions says older integrations added snippets to the theme's snippets folder and edited layout, template and section files, and that uninstalling apps often leaves those edits behind. Shopify calls it ghost code, and says it can cause quality and performance issues. The Uninstalling apps help page gives merchants the same warning: some apps add code that isn't removed automatically, so check the app's listing or ask its developer about extra steps before you uninstall.
If your store has traded for a few years and tried apps along the way, assume some of that code is still in the theme until you have checked. That check is the core of a Shopify app audit.
What leftover app code costs a trading store
Not every leftover does harm. A snippet file that nothing renders is clutter. A snippet still rendered from layout/theme.liquid runs on every page of the store, and that is where the cost sits.
- Speed. Shopify lists the apps you've installed and third-party code added by hand among the biggest factors in store performance. A leftover script pointing at the old vendor's server still costs a request on each page view, and if it loads without
deferorasyncit holds up the browser while it reads the page. - Layout shift. Shopify names app-injected content, alongside images without dimensions and fonts that swap in late, as common causes of layout shift. Our guide to finding and fixing layout shifts on Shopify shows how to trace which element moves.
- Theme updates. Shopify warns that an app which edits theme code can take the theme off its upgrade path, and that when the code is removed, leaving even an extra line break or space keeps it off.
- Tracking and consent. Old pixel and conversion snippets deserve particular attention. One left beside your current setup can count purchases twice, and an advertising tag loading outside your cookie banner is a consent problem: the ICO says ad measurement still needs consent under UK rules. If your figures disagree with Shopify's, see why Shopify purchases go missing or double up in GA4.
Start with a list of every app the store has had
The Apps page in your Shopify admin lets you view an app's entire install history, which Shopify describes on the same Uninstalling apps page. That history is your starting inventory. Put it in a sheet with these columns:

- the app's name, and whether it is installed now
- what it did on the storefront: reviews, upsells, size charts, pop-ups, tracking
- how it attached: app block, app embed, or code in the theme files (the listing or the developer's help pages usually say)
- the domains its scripts loaded from, where you can find them
- the developer's removal instructions, if they published any
Include the apps that are still installed. Shopify's advice on improving performance is to check that each installed app creates enough value to offset any performance cost. An app nobody has opened in months, or one switched off in its own settings while its embed stays active, belongs on the list too.
Read the Web Performance reports before touching code
Get the real-visitor picture first, so you know what you are trying to move. In your admin, go to Online Store > Themes and click Loading speed, Interactivity or Visual stability in the banner to open the Web performance reports. The Over Time chart shows how changes such as app installs, theme updates and new code line up with each Core Web Vital. The By Page URL view shows which pages are weakest. The data comes from real users over the past 30 days and is ranked Good, Moderate or Poor at the 75th percentile.
Shopify's overview of web performance gives the targets: Largest Contentful Paint within 2.5 seconds, Interaction to Next Paint under 200 milliseconds and Cumulative Layout Shift less than 0.1, with at least 75% of page loads needing Good scores across all three.
Treat a dip that lines up with an app install as a lead, not a verdict. The reports show timing, not cause. Keep these field figures apart from any Lighthouse run, too: Shopify treats Lighthouse as a lab test, and a Lighthouse score is not your Core Web Vitals result.
Search the theme code for snippets apps left behind
Reading code changes nothing, so you can do this in the code editor or on a downloaded copy of the theme. Work through it in this order.

layout/theme.liquid. Look in the head and just before the closing body tag. Note any script loading from a domain you don't recognise, and any render tag naming an app you no longer have, such as{% render 'old-app-widget' %}.- The
snippetsfolder. Look for files named after old apps or their vendors. - Templates and sections. Search the whole theme for each removed app's name and script domain from your sheet. Product, cart and collection files are where widget code tends to sit.
- The
assetsfolder. JavaScript and CSS files carrying an old app's name are usually loaded from one of the places above.
Then run Theme Check, Shopify's official linter. Install Shopify CLI with npm install -g @shopify/cli, then run shopify theme check from the theme folder, as the Theme Check linting tool page sets out. Three entries in the checks reference matter most for an app audit:
- OrphanedSnippet (warning): snippets that exist but are never referenced or rendered. Often old app files, and low risk once you have confirmed nothing calls them.
- RemoteAsset (warning): assets loaded from third-party domains. Match each one against your app list.
- ParserBlockingScript (error): script tags without
deferorasync.
The --output json flag in the Theme Check commands writes the results to a file, which gives you a before and after to compare. Theme Check also reports issues that have nothing to do with apps, so filter its output against your sheet rather than fixing everything at once.
Check app embeds and network requests on the storefront
In the theme editor, open Theme settings > App embeds, where Shopify's documentation on configuring theme app extensions says embeds are activated. Each embed there belongs to an installed app. If you have stopped using the app, deactivating the embed on your duplicate is a quick test; uninstalling the app is the clean finish.
Next, open the storefront in a private Chrome window, open DevTools, go to the Network panel and reload. Do this on the home page, a collection, a product page and the cart. Sort the requests by domain and match every third-party domain against your sheet. A domain that belongs to a removed app means its code is still being called from somewhere, so search the theme for it.
Some older apps loaded scripts through script tags registered with the API rather than written into your files, so they never appear in the code editor. Shopify's Apps in the online store page says apps can't create or update script tags after 1 October 2026, and that Shopify will stop adding them to storefronts on 1 March 2027. Until then, a request from a removed app that shows in the Network panel but nowhere in your theme files is a question for that app's developer.
Remove leftovers on a duplicate theme, one app at a time
Never edit the live theme for this. The order that keeps a trading store safe:

- Duplicate the theme. In Online Store, open the actions menu beside the live theme and click Duplicate. The copy appears as Copy Of plus the theme's name, as described in Duplicating themes. If you are at your plan's limit (up to 20 themes on Basic, Grow and Advanced, up to 100 on Shopify Plus, according to Adding, previewing, and buying themes), download an old theme before deleting it, because deletion is permanent.
- Freeze edits on the live theme. Anything the team changes there while you work will be missing from your copy when you publish.
- Use the developer's instructions first. Shopify requires app developers whose app leaves code behind to tell merchants how to remove it completely.
- Remove one app's code at a time. Take out the render tag or script line, preview, and only then delete the snippet or asset file. Leave no stray blank lines where the code was.
- Click through what usually breaks. Home page, a filtered collection, a product with variants, add to cart, the cart drawer and cart page, search, and the first step of checkout, on a phone as well as desktop. Share the preview link so someone who knows the store checks it too.
- Re-run your checks. Run Theme Check again and repeat the Network panel pass. The old domains should be gone and nothing new should be failing.
- Publish, and keep the way back. When you publish, Shopify moves the previous theme to Draft themes with none of its changes lost, per Publishing themes. That is your rollback.
Afterwards, watch the Web Performance reports. Because they cover a rolling 30 days, the effect shows gradually rather than the next morning. Our guide to speed changes without breaking your theme covers this duplicate-first routine in more depth.
Why leftover app code is rarely the whole speed problem
Clearing out ghost code is worth doing, but don't stop there. Shopify's performance guidance is blunt that badly written first-party code is just as damaging as a poorly implemented third-party script, and its list of biggest factors includes the theme itself and tag managers with the tags inside them. A product image that is lazy-loaded when it is the largest thing on screen, or heavy Liquid slowing the first response, will hold a store back with every app gone.
If the reports still look poor after a clean-up, work through why a Shopify store is slow, check by check. If you are weighing a speed app against hands-on work, our comparison of speed apps and developers explains what each can change.
When to bring in a specialist for an app audit
Most of this audit is reading, and a careful owner or ecommerce manager can do it. Hand it over when the leftovers are tangled into product and cart templates you can't read with confidence, when removing a snippet breaks the variant picker or cart, when a removed app's script keeps loading and you can't find where from, or when you are an agency facing the same job across several client stores.
At Shopi5Pro, the people who investigate a problem are the same people who build, test and document the fix, and each job ends with a handover covering what was tested. A one-off clean-up of a broken or cluttered theme is a perfectly good reason to get in touch, with no ongoing commitment, and if the real goal is better Core Web Vitals our speed optimisation work starts from the same audit. Agencies can bring us in on a white-label basis. Scope and cost are agreed before any work starts, and every enquiry through the contact page is read in-house and answered by email within one or two working days.
You can start today without touching any code: open the install history on the Apps page, list every app, run Theme Check on a downloaded copy, and sort a product page's requests by domain in the Network panel. If every domain on that list belongs to an app you still use, your theme is in better shape than most. If not, you now know exactly where to look.
Sources
- Shopify Help Center, Extending themes with apps (read November 2026)
- Shopify, Shopify Developers Platform (read November 2026)
- Shopify, Migrate to theme app extensions (read October 2026)
- Shopify Help Center, Uninstalling apps (read November 2026)
- Shopify Help Center, Improving your online store performance (read November 2026)
- Shopify, Performance best practices for Shopify themes (read November 2026)
- Shopify, Apps in the online store (read October 2026)
- Information Commissioner's Office, Guidance on the use of storage and access technologies (read November 2026)
- Shopify Help Center, Web performance reports (read November 2026)
- Shopify Help Center, Overview of web performance (read November 2026)
- Shopify, Theme Check linting tool (read October 2026)
- Shopify, Checks reference (read November 2026)
- Shopify, Theme Check commands (read October 2026)
- Shopify, Configure theme app extensions (read November 2026)
- Shopify Help Center, Duplicating themes (read November 2026)
- Shopify Help Center, Adding, previewing, and buying themes (read November 2026)
- Shopify Help Center, Publishing themes (read November 2026)







