You can remove unused Shopify theme sections and templates safely, as long as you check what each file is actually doing before you delete it. The safe order is simple: work on a duplicate theme, check which templates are assigned to live products, pages and collections, archive a copy, and only then remove files that are clearly not in use. If you cannot tell whether a file is used, keep it.
Most stores need this cleanup at some point. Themes collect clutter over years of small changes, test campaigns and app trials, and together it makes your theme harder to work in and easier to break.
Why unused sections and templates pile up
Every store leaves a trail. You ran a sale two years ago and made a special product template for it. You tested a landing page for one campaign and never used it again. You tried a different theme for a weekend, copied some sections across, and forgot they were there. An app added a section when you installed it, and the section stayed after the app went.
Staff also copy files to be safe. A template gets duplicated before an edit, the copy gets a name like final or test2, and nobody goes back to remove it.
That clutter costs you in three plain ways.
- A confusing editor. When your team opens the theme editor or assigns a template, they see a long list of near identical names. Sooner or later someone picks the wrong one, and a product goes live with an old layout.
- Real mistakes. An old test page can still be live and reachable. Search engines can find it, customers can land on it, and it may show old prices, old claims or a half finished design.
- Slower maintenance. Every theme update, every fix and every new feature has to work around the dead weight. People waste time checking files that do not matter, and they hesitate to touch files in case something depends on them.
Cleanup is not about making the file list look tidy. It is about knowing, for certain, which files your store runs on.
Start with a duplicate theme
Never clean up your live theme directly. In your admin, open the theme library, duplicate your published theme, and do all of the work on the copy. Give the duplicate a clear name with the date, so anyone on your team can see what it is.
The duplicate protects you in two ways. First, if you remove the wrong file, your live store keeps running while you fix the copy. Second, you can preview the cleaned theme as a whole, exactly as a customer would see it, before anyone else sees it.
Work slowly and in one sitting if you can. Cleanup done in small pieces across several weeks is how files get removed without anyone remembering why. Publish only when the whole pass is done.
Safety rule: never remove a file that a live template uses, and if you cannot tell, keep it. A file you keep by mistake costs nothing. A file you remove by mistake can break a page your customers use every day.
Check which templates are actually assigned
This is the step that makes the whole job safe. A file name tells you very little. A template that looks like a test may be assigned to a real product, and a template with a clean, sensible name may be assigned to nothing at all. Assigned means in use, whatever the file looks like.
Go through your store in the admin, section by section:
- Products. Open your product list and note which theme template each product uses. Check your best sellers and any product with a special layout first.
- Collections. Note the template assigned to each collection, including collections you rarely edit.
- Pages. Check every page, including older content pages, sizing pages and policy style pages that were built as templates.
- Blog posts and the home page. Note the templates and sections they rely on, since these are easy to overlook.
Write the list down as you go. For each template file, mark it as assigned or unassigned, and note what it is assigned to. Also note sections that appear inside assigned templates, because a section file can look unused on its own while a live template pulls it in.
Pay extra attention to files with vague names. Names like custom, new, alt or copy often hide real work someone did quickly and forgot to label. Open them and check them against your assignment list before you judge them. If a file is referenced by an assigned template, treat it as in use.
Archive first, remove second
Before you delete anything, save a full copy outside the theme you are cleaning. Download the duplicate theme, or keep an untouched duplicate in your theme library, and leave it alone for at least a month after the cleaned theme goes live. That archive is your way back if a problem shows up late, for example on a page that only gets traffic during a sale.
Then remove files in a careful order:
- Start with files that are unassigned and clearly test files, such as names with test, draft, old or a date from a finished campaign.
- Next, remove leftover templates from themes or tools you no longer use, as long as your assignment check shows nothing points to them.
- Leave anything shared, unclear or recently created exactly where it is.
This pairs well with removing leftover app code, since the two kinds of clutter usually arrive together and are safest to clear in the same pass. Remove a small group of files at a time, then preview, rather than deleting everything in one go. If something breaks, a small group tells you quickly which file mattered, and your archive lets you put it straight back.
Keep a short note of what you removed and when. One line per file is enough. If a question comes up later, that note saves you from guessing.
Preview the whole store before publishing
A cleaned theme can look fine on the home page and still be broken somewhere quiet. Before you publish, preview the duplicate and walk through the store like a customer.
- Open the home page, a collection, a normal product and any product with a special template.
- Open your main content pages, a blog post and your cart.
- Check the header, footer, search and menu on desktop and on a phone.
- Add a product to the cart and start checkout, to be sure nothing in the path broke.
Click through slowly. Look for missing sections, empty spaces where content used to sit, and pages that fall back to a plain default layout. That last one is the classic sign that a template was removed while something still pointed at it.
When the preview is clean everywhere, publish the duplicate and check your most visited pages again once it is live, since a preview cannot show you everything. After a month with no problems, you can let the archive go.
A tidy theme is also easier to grow. Once the dead files are gone, building a section library from the sections you actually use becomes a much smaller job, because every file left in the theme has a real job.
How PageVert helps
Cleanup is easier to keep up when your tools do not add clutter back. With the theme updater, PageVert carries your custom changes onto the new version of your theme, so you can update without dragging years of dead files along or starting again from a stock copy. Designs you add from PageVert can also be removed cleanly, without leaving stray files behind in your theme. Plans start at $97 a month with 100 credits, and a theme update costs 5 credits. Keep the theme you cleaned, and let each update respect the work you just did.
