Every Shopify merchant has been there. You install an app, try it for a week, decide it's not for you, and hit uninstall. Problem solved, right?

Not quite. Most Shopify apps inject code directly into your theme files when they're installed — and most of that code stays behind when you uninstall. It sits in your theme's layout/theme.liquid, your snippets/ folder, or your assets/ directory, loading on every single page view, making requests to servers that may not even exist anymore.

We call these ghost scripts — and the average Shopify store has 3 to 5 of them.

Why doesn't Shopify clean this up automatically?

This is the question every merchant asks, and the answer is surprisingly straightforward: Shopify can't safely do it.

When an app installs, it uses the Shopify Admin API to modify your theme files. It might add a script tag in theme.liquid, create new snippet files, or inject CSS into your stylesheet. The problem is that Shopify has no reliable way to track exactly which lines of code belong to which app. An app might modify a file that you later edited manually, or two apps might share the same snippet file.

If Shopify tried to automatically remove code during uninstall and got it wrong, it could break your entire storefront. So they leave it alone. It's the safe choice — but it means your theme accumulates dead weight over time.

What ghost scripts actually do to your store

Ghost scripts aren't just messy — they actively hurt your performance. Here's what's happening behind the scenes:

A store we recently scanned had 7 ghost scripts from apps uninstalled over the past year. They were adding 1.8 seconds to every page load and generating 23 JavaScript errors per session. The merchant had no idea.

How to find ghost scripts on your store

There are two approaches: manual and automated.

The manual approach

Open your store in Chrome, right-click, and choose "Inspect." Go to the Network tab, reload the page, and look at every JavaScript and CSS file that loads. For each one, ask yourself: do I recognise this? Is this from an app I'm currently using?

Then open your theme code in the Shopify admin (Online Store → Themes → Edit Code) and search through theme.liquid, snippets/, and assets/ for any references to apps you've uninstalled. Common patterns include script tags with third-party domains, snippet files named after apps (e.g., snippets/judgeme_widgets.liquid), and inline JavaScript blocks with app-specific variable names.

This works, but it's tedious and error-prone — especially if you've cycled through a lot of apps over the years and don't remember which ones you've tried.

The automated approach

This is exactly what ShopSentry's free store audit does. Paste your store URL and we'll scan your page for every script, stylesheet, and external request. We cross-reference them against a database of known Shopify app signatures and flag anything that looks orphaned. The whole process takes about 30 seconds and doesn't require any app install or Shopify access.

Common offenders we see

These are the apps that most frequently leave code behind after uninstall:

Review apps (injecting widgets in product templates), upsell/cross-sell apps (adding scripts to cart and product pages), analytics and tracking apps (injecting pixels in the theme head), and page builder apps (leaving custom CSS and helper scripts in the assets folder).

The worst offenders leave code in multiple files — a script tag in theme.liquid, a snippet in snippets/, a CSS file in assets/, and sometimes even modified product template files.

How to safely remove ghost scripts

Once you've identified the culprits, the removal process is straightforward but requires care:

  1. Duplicate your theme first. Always work on a copy. If something breaks, you can revert instantly.
  2. Remove script tags from theme.liquid. Search for the app's domain name (e.g., judgeme.io, loox.io) and remove the entire <script> or <link> block.
  3. Delete orphaned snippet files. If a snippet is only referenced by a script you just removed, delete the snippet file too.
  4. Clean up assets. Remove any CSS or JS files in assets/ that belonged to the uninstalled app.
  5. Test thoroughly. Preview your duplicate theme across several pages — homepage, product page, collection page, cart, and checkout entry. Make sure nothing looks broken.
  6. Publish. Once you're confident, publish the cleaned theme as your live theme.

The bigger picture: ongoing theme hygiene

Ghost scripts are a symptom of a broader problem — theme entropy. Every app install, theme update, and manual code edit adds complexity. Over months and years, that complexity compounds.

The merchants who maintain the fastest stores treat theme hygiene like they treat inventory management: they audit regularly. At minimum, check your theme code every time you uninstall an app. Better yet, set up automated monitoring that catches new performance issues the moment they appear.

That's the difference between a one-time audit and continuous monitoring. The free scan tells you what's broken today. ShopSentry's paid monitoring catches the next issue the moment it happens — before it costs you a single sale.

Find your store's ghost scripts in 30 seconds

Free audit. No install. Just paste your URL.

Scan My Store — Free →