How are you handling leftover app scripts across multiple stores?

I manage several Shopify stores and every quarter I end up spending hours per store cleaning up orphaned scripts from apps that were uninstalled months ago. The process is always the same — open theme.liquid, Ctrl+F for script tags, Google the domain to figure out which app it was, check if it’s still installed, backup, remove, test.

I’m wondering:

  1. Do other developers/agencies actually do this regularly, or just when a client complains about speed?

  2. Has anyone found a faster workflow than the manual Ctrl+F approach?

  3. How many orphaned scripts do you typically find per store?

For context — last cleanup I found 6 dead scripts on one store loading ~150KB of JS for apps the client uninstalled over a year ago.

@Kinzen

A faster and more reliable method is to start from the browser instead of the code:

1. Use DevTools → Network tab (Browser using inspect)

Reload the page and filter by JS. we will see instantly see all third-party scripts, their domains, and their size impact. It’s much quicker to spot dead script and unused apps this way than check each an every files through theme files.

2. Check App Embeds first (OS 2.0)

A lot of leftover scripts now live there, even after uninstalling apps.

Go to the theme customisation and check in the each page which app block is exist or its currently we using or not app block

3. Use Lighthouse or similar audits

Tools like Lighthouse can highlight unused JS and third-party impact, which helps prioritize what to remove.

4. Then clean code selectively

Once you identify the source, go into the theme and remove only what’s confirmed in the above steps find unused app script , instead of blindly searching in the theme.liquid file.

Thanks — solid workflow. The DevTools Network approach is definitely faster than digging through theme files blind.

Curious about your experience though — how many stores do you typically manage? And roughly how often do you run through this process per store? I’m trying to figure out if this is a “once a year” thing or something that comes up every few months as clients keep installing and removing apps.

Use the actual dev forums for this stuff, posting it here you’ll mostly post a bot bait post so will mainly get answers you could get from just googling or using a chatbot.