Skip to content

Alpenglow Software · Guides

How to find and remove leftover code from uninstalled Shopify apps

Updated October 12, 2026

Short answer: uninstalling an app doesn't always remove its code. Modern apps add themselves through app blocks and app embeds, which stop loading when you uninstall. Older apps, and setup steps where you pasted code yourself, leave code in your theme files. To remove it: duplicate your theme, search the code for the app's name and its web address, remove each line that loads the app's code before you delete any of its files, preview the copy, then publish it.

Prefer an automatic check? GhostCode scans your theme for leftover app code and shows which app each piece came from. It only reads your theme. Free and paid plans available.

Why some apps leave code behind

There are two ways an app can put code on your storefront, and they behave very differently when you uninstall:

How the app was addedWhat happens when you uninstall
App blocks and app embeds (a theme app extension). You switch them on in the theme editor under App embeds or add them as blocks.They stop loading. Shopify's developer docs say an app's blocks are automatically removed from your theme when you uninstall it. An entry for the app's embed can stay in the theme's settings file (config/settings_data.json). With the app gone it should load nothing.
Code written into your theme files, by an older app or by you following its setup instructions.It stays. The app loses access to your store at the moment you uninstall, so it can't clean up after itself, and Shopify doesn't know which lines it added.

Shopify introduced theme app extensions in 2021, and new apps in the Shopify App Store that work with your theme must use them instead of editing theme files. So the stores with the most leftovers are usually older stores, stores that have tried many apps, and stores that were moved from another platform and had apps installed "just in case." Review widgets, popups, currency converters, upsell tools and page builders installed years ago are common sources.

Where leftover app code hides

Step by step: removing it safely

  1. Duplicate your live theme. In your admin, go to Online Store → Themes, open the menu (…) on your current theme and choose Duplicate. Make every change on the copy. If anything breaks, your live store is untouched.
  2. List the apps you've removed. Your memory and old app invoices help. For each one, note its name and the web domain it loaded from (you'll see it in the leftover code itself, for example cdn.appname.com).
  3. Search the copy's code. Open the copy's code editor (… → Edit code) and search the theme for each app's name and domain. Work through every match.
  4. Remove the line that loads the code before you delete the file. If theme.liquid says {% render 'appname-widget' %}, delete that line first, search for any other place that renders the same snippet, and only then delete snippets/appname-widget.liquid. A render line pointing to a missing snippet shows a Liquid error on your storefront.
  5. Check Custom Liquid sections in the theme editor for pasted app code.
  6. Preview the copy on your homepage, a product page, a collection and the cart. Look for blank spaces, Liquid errors or anything that looks wrong.
  7. Publish the copy and keep the old theme for a few weeks in case you need to compare.

Not sure whether a line belongs to an app you still use? Leave it. Removing live app code breaks that app. And if the app's developer is still around, ask them: they know exactly what they added.

How to tell if it's slowing your store

Speed scores move a few points between runs, so compare several tests before and after rather than one.

Script tags and the March 1, 2027 deadline

Script tags are a separate, older way for apps to load code on your storefront. Shopify adds them to your pages for the app; they don't appear in your theme files, so a search of your code won't find them.

Where GhostCode fits

We make GhostCode, a Shopify app that does the search above for you. It scans your theme against signatures for 100+ apps, shows each leftover with the app it came from, the file, the line and the code, and groups findings by what they cost you: speed, what Google and AI tools see, and tracking that still runs. It also lists apps on your store that still depend on script tags before the 2027 deadline, and flags scripts from known malicious domains. GhostCode only reads your theme. It never edits it, so you stay in control of every change. Read how GhostCode works. Free and paid plans available. See the GhostCode listing on the Shopify App Store for features and plans.

Common questions

Does uninstalling a Shopify app remove its code from my theme?

Not always. App blocks and app embeds stop loading, and code written into your theme files stays. Full answer: what uninstalling a Shopify app removes and what it leaves behind.

Can leftover app code slow down my store?

Yes. A leftover script or stylesheet tag still makes the browser request that file on every page view, even though the app is gone. If the app's server no longer answers, the request can fail slowly or throw errors in the browser console. Leftover CSS and snippets add weight even when nothing breaks.

Is it safe to delete an app's snippet file?

Only after you remove every line that loads it. If a render or include tag still points to a snippet you deleted, the theme shows a Liquid error where that snippet used to be. Search the whole theme for the snippet's name, remove those lines first, then delete the file, and do it on a duplicate theme.

What happens to script tags on March 1, 2027?

Shopify stops adding script tags to online store pages. Since October 1, 2026, apps can't create or update them. Any app that still loads its storefront code through a script tag stops working on your store on that date unless its developer moves it to an app embed or a web pixel.

Do I need to remove an uninstalled app's script tags myself?

Usually not. Script tags belong to the app that created them, and Shopify removes them when you uninstall that app. The leftovers you remove yourself are the code that was written into your theme files.

Check your theme in a few minutes: install GhostCode from the Shopify App Store. It never edits your theme. Free and paid plans available.

Sources

Questions: support@alpenglowsoftware.com