Catalog Audit

Audit tool / Guides

How to Remove Leftover App Code From Your Shopify Theme

By Evan Walter · Updated 2026-11-26

Uninstalling a Shopify app does not always clean up your theme. Shopify's help center warns that some apps add code to your online store theme that isn't automatically removed when you uninstall the app. To remove it, duplicate your theme, search the copy's code for the old app's name or domain, delete the leftover snippet, check the copy in the theme editor, then publish it.

Why leftover code matters

Leftover code can keep loading scripts, stylesheets or tracking pixels from a service you no longer use. That adds weight to page loads. The audit lists the non-Shopify domains that load scripts on your homepage, which is a quick way to spot one that points to an app you removed. For the wider picture, see Shopify app bloat.

Before you uninstall an app

Shopify recommends checking the app's App Store listing or contacting the developer to see whether extra steps are needed. Some apps document how to remove their theme code. Also note that some apps store data you can't recover after uninstalling, so export anything you need first.

To uninstall, go to Settings > Apps in your Shopify admin, click the menu icon next to the app, then click Uninstall.

Step 1: Duplicate your theme

Shopify's help center recommends duplicating your theme before you customize its code, as a backup. In your Shopify admin, open Online Store, click the horizontal menu button (⋯) for your live theme, then choose Duplicate. The copy appears as "Copy Of" followed by the original name. You can only duplicate if you have fewer than 20 themes.

This matters because Shopify says deleted theme files can't be recovered, and the per-file Timeline view can't restore an entire theme. Do all your edits on the copy.

Step 2: Open the code editor on the copy

From Online Store, click the horizontal menu button for the duplicate and select Edit code. Shopify advises editing theme code only if you know HTML and CSS and have a basic understanding of Liquid. If that isn't you, hand this job to a developer.

Step 3: Search for the old app

Click the search icon in the left sidebar to search across all files. Try:

Shopify's help center notes that some apps inject code directly into your theme, so a match can be in any theme file.

Step 4: Remove it carefully

  1. Read the match in context. Remove only the lines that belong to the old app, such as its script tag or its render line.
  2. If a snippet file is only used by that app, make sure nothing else renders it before deleting the file. Search for the file name first.
  3. Save, then repeat for each match.

If you make a mistake in one file, Shopify's Timeline view lets you restore that file's earlier contents: open the file, open Timeline, select an entry, right-click it, choose Restore contents, then click Restore. Copy the current contents somewhere safe first, because restoring replaces the whole file.

Step 5: Check the copy, then publish

In Online Store, find the copy under Draft themes and click Edit theme to load it in the theme editor. Click through your homepage, a collection, a product page and the cart, and look for missing elements. If everything works, click Publish on the top bar of the theme editor, then confirm in the window that opens.

If you've edited the live theme since you made the copy, those changes won't be in the duplicate, so make the cleanup quickly after duplicating.

Also check app embeds

Some apps use app embeds instead of theme code. In the theme editor, click the App embeds icon in the sidebar and switch off any you no longer need, then save. App embeds can be turned on and off from the theme editor, as Shopify describes.

Verify the result

Run the audit again on your homepage. The old app's domain should no longer appear in the third-party scripts list. For another speed win that needs no app, see image file size and speed.

Check your own store in 20 seconds

The free Catalog Audit for Shopify stores scans up to 1,000 products for empty or thin descriptions, duplicate titles, missing alt text and more, then links each issue to a fix.

Prefer to hand it off? I'm Evan, a software engineer who works on Shopify stores. Leave your email and store URL and I'll reply with a short, prioritized fix list. Free, no obligation.