How to Remove Leftover App Code from Shopify (2026)

Last updated
Expert reviewed
5 min read
Jacques Blom
Jacques Blom
CTO at Fudge.

Key takeaways

  • Uninstalling a Shopify app does not automatically remove the code it added to your theme.
  • Leftover code slows your store down with scripts loading for services that no longer exist.
  • Find leftover code by searching for the app name in your theme’s code editor.
  • Always work on a duplicate theme. Never edit your live theme directly.

Every time you install a Shopify app that modifies your theme, it leaves its fingerprints behind. When you uninstall the app, Shopify removes the app itself — but the code it added to your theme stays. Over time, as you cycle through apps, this cruft accumulates. Scripts load for services you no longer use. CSS classes reference styles from apps that haven’t existed for years.

This cleanup is one of the most underrated Shopify performance improvements.

How do I delete code in Shopify?

The short answer: Online Store → Themes → Actions → Edit code. This opens the code editor where you can view and edit all theme files. Deleting code requires knowing what’s safe to remove — the steps below help you identify it.


Step 1 — Duplicate your theme before touching anything

This is mandatory. Go to Online Store → Themes → find your active theme → click the three-dot menu → Duplicate.

A mistake in the wrong file breaks your entire storefront. Working on a duplicate means you can always revert by switching back to the original.


Step 2 — Search for the app name in your theme code

Open the code editor (Online Store → Themes → Actions → Edit code).

Most code editors have a search function. In Shopify’s editor, use the search bar at the top to find the app’s name. Try:

Where to look:

theme.liquid — the most common location for leftover script tags. Apps often add JavaScript includes to the <head> or before </body>. Look for <script src="https://app-name.com/..."> tags that remain after uninstallation.

snippets/ folder — apps often create new snippet files (e.g., loox-reviews.liquid, privy-popup.liquid). These appear as new files in the snippets folder that weren’t there before the app was installed.

sections/ folder — some apps add new section types. After uninstalling, the section file remains but the app functionality is broken.

assets/ folder — apps sometimes add CSS or JavaScript files here.


Step 3 — Identify what’s safe to remove

Not all “leftover” code is harmful. Some apps add features you continue to use via the rendered HTML even after the app is uninstalled (this is unusual but possible). Check each piece of code before deleting.

Safe to remove if:

Be cautious with:


Step 4 — Remove the code

For script tags in theme.liquid: delete the entire <script> tag (including the opening and closing tags).

For snippet files: click the file → delete from the three-dot menu next to the filename.

For section files created by an app: only delete if the section is no longer used in any templates or active pages.

After each deletion, preview your storefront to confirm nothing breaks.


Common apps that leave significant code behind

Popup and email capture apps (Privy, Sumo, Justuno) — often add large JavaScript files to theme.liquid.

Review apps (Yotpo, Loox, Judge.me) — add snippet files and often render code in product templates.

Chat apps (Gorgias, Tidio, Intercom) — add chat widget script tags to theme.liquid.

Social proof apps — add notification popups via scripts in theme.liquid.

Page builder apps (uninstalled PageFly, Shogun, GemPages) — can leave substantial section and snippet files behind.

Clean up your Shopify theme and build fresh native sections with Fudge.
Try Fudge for Free

Using Shopify’s App Embed system to prevent future leftover code

Modern Shopify apps use the App Embeds system (Online Store → Themes → Customize → App Embeds icon). When an app uses App Embeds properly:

When choosing new apps, prefer those that use App Embeds over apps that ask you to paste code into theme.liquid. You can check this in the app’s installation instructions.


Using Theme Inspector to find slow scripts

The Shopify Theme Inspector Chrome extension shows which scripts and assets are contributing most to page load time. After cleaning up leftover code, run it to confirm the scripts are no longer loading.

Jacques's signature
Rebuild your Shopify sections cleanly by describing what you want.

You might also be interested in

How to Add an Email Pop-Up in Shopify (2026)
Add an email popup to Shopify — using the built-in email capture popup in Online Store Preferences, or a Klaviyo/Omnisend popup with targeting
How to Add Review Widgets in Shopify (2026)
Add product reviews to your Shopify store — install Judge.me, Stamped, or Yotpo, enable the widget via App Embeds, and place reviews on product
How to Add UGC Widgets in Shopify (2026)
Add user-generated content widgets (Instagram feed, TikTok, customer photos) to Shopify using Covet.pics, Instafeed, or TaggShop