Blog / Shopify & e-commerce /

Removing leftover app code from a Shopify theme

You uninstall a Shopify app and the widget vanishes. Job done? Not quite. The theme still has the app’s snippets and script tags sitting in it, quietly throwing console errors, loading assets nobody needs, or getting in another feature’s way.

Not every app leaves a mess, but it’s worth checking before and after you remove one. Before touching a live theme, I find out what the app added, confirm nothing else depends on it, duplicate the theme and test the cleanup there. Apps and themes change, so follow the app’s current uninstall instructions and keep a way back.

Start with the app’s own removal process

Read the app’s documentation and look for a supported uninstall or cleanup step. Some apps remove their own code, while others add snippets or theme blocks that need manual removal. Contact the vendor if the instructions are unclear. Deleting the app doesn’t mean every change it made is gone.

Record the app’s purpose and which pages or workflows use it. Was it a review widget, bundle builder, tracking script, page feature or checkout integration? Check with the people responsible for the store before removal. The app may be supporting a process that is not obvious from the storefront.

Duplicate the live theme and inspect the copy. Keep the original theme unchanged until you have verified the result. If you use a version-controlled or documented theme workflow, record the current state before editing. A rushed cleanup on the live theme can turn a small tidy-up into an outage.

Find what the app added

Theme app extensions may appear as app blocks or embeds in the theme editor. Check the relevant templates and app embed settings. If the app used older installation methods, it may have added snippets, script tags, liquid code or assets to theme files. Search for the app name, vendor identifier or snippet names in the theme code.

Also check external script management, tag managers and custom code fields. An app may inject code through a Shopify script integration or a tag manager rather than a theme file. If the store has custom apps or developer code, ask the person who maintains them before removing a reference that looks related.

Use the browser console and network panel to see which scripts load on the storefront. A script URL or global variable can help identify a vendor, but it is not conclusive on its own. Some assets serve several features or are shared across apps. Confirm ownership before deleting code.

Remove only verified leftovers

Make a list of files, snippets and settings that belong solely to the removed app. Compare the theme copy with the live version if you have a clean baseline. Remove one related item at a time and preview the pages where the app was used.

Check that product pages, collections, cart, search and checkout still work. Test mobile and desktop layouts, keyboard access and any forms or purchase flows. Look for broken sections, missing reviews, duplicate widgets, console errors and failed network requests. If the app supported a key customer action, verify the replacement path before removing it.

I don’t delete a script just because it’s large or shows up in a performance scan. Confirm that it is not required for another integration. An unused script may still be present in an app embed setting or a tag manager, so search all likely sources rather than removing the first matching snippet you find.

Check performance and page output

Test the same representative pages before and after cleanup under similar conditions. Use a lab tool to inspect requests and rendering, and field data where available. Fewer scripts only matter if the storefront still works and visitors get a better experience.

Inspect page source and rendered content. Ensure title, canonical, structured data and product information remain intact. Some apps may add schema or metadata; if another system now handles those elements, check for duplicate output. A cleanup can change more than visual widgets.

If the app was installed across many templates, sample the whole site. A product page may be clean while a collection page still loads the script. Check the theme’s global app embeds and any landing pages created by the tool.

Keep a record and a rollback plan

Note the app removed, the cleanup steps, files or settings changed, test pages and date. Keep the original theme available until the updated theme is published and reviewed. If something breaks, restore the known-good theme rather than making several rushed edits.

After publishing, revisit the key pages and check for errors. Monitor the store’s main journeys and ask staff whether the replacement workflow is working. Keep the app’s data export or documentation where appropriate before deleting an account that may contain reviews or customer settings.

A safe cleanup sequence

Start with a duplicate of the live theme and record which app is being removed and why. Check the developer’s uninstall guide before editing anything; some apps add code through theme app extensions or settings rather than a manually inserted snippet. Removing the visible widget may not remove every integration, but old code can also be part of a shared feature that another app still uses. Search theme files for the app name and distinctive script or snippet references, then compare them with the app’s instructions.

Change one thing at a time. Preview key templates, including a product page, collection, cart and any page where the app was visible. Open the console and network panel for failed requests, but don’t assume every warning is related. Test the actual visitor task, such as selecting a variant or opening a review panel. If the result is unclear, restore the duplicate and ask the app developer or a Shopify developer to identify the dependency. Keep a note of what was removed so the next person does not have to rediscover it.

Before deleting an app’s code, work out exactly what feature it supported and test the replacement on a theme copy. Which leftover script can you prove is no longer needed?