Craftshift logo

Shopify Bulk Delete Files: Free Storage Without Breaking Your Store

how to bulk delete shopify files

Why, oh why, does Shopify not allow shopify bulk delete files?! I’m trying to organize thousands of files and it feels like the Files page loads at a glacial pace. It’s hard enough dealing with thousands of old hero banners, duplicate product images caused by a faulty CSV import, and hundreds of old PDFs that I never knew I had. While the native Shopify Files page does provide a useful checkbox next to each file, it’s quite disappointing to have to confirm the deletion of each item individually (and slow confirmation dialog too).

This guide will cover all the relevant options available for you, including storage limits for each plan, how to find out your unused storage space, how storage can be used natively and via the storage API, and the apps that can aid in deleting large amounts of storage space. It will cover everything relevant without covering unnecessary topics.

warning: Deleting files in Shopify is permanent. there is no trash can, like with regular files on your hard drive. As a result, theme sections and product descriptions which reference URLs you are about to delete can display a broken image after you delete those files. So please, be sure you have a backup of your store before you continue to read this post.

What’s in this guide

Shopify file storage limits per plan

It’s commonly known that Bigcommerce caps storage “at” different levels for different plans, but what’s been left out in the dialogue around this comparison is that Shopify does not cap storage at all (or at least, they don’t publicly announce one). On paper, you have “unlimited storage”, and while you may not hit a cap before the platform starts to break in a crisis, you will run into all sorts of pain points before that. The Files page will cease to function after a few thousand files, uploads will be capped, and your admin can become nearly unusable due to server load.

What does have caps? Individual file size. 20MB per image, 1GB per video, 500MB per 3D model. Product image quantity is also capped at 250 per product – this is a combined limit imposed by Shopify, not our app. However, if you are using Combined Listings, you will be able to go up to 2048 variants per product. This means there is huge potential for image sprawl, especially for products with many variants.

Asset typePer-file capWhere it lives
Product image20 MB, 25 megapixelsProduct media + Files
Video1 GB, 10 minFiles
3D model500 MBFiles
Generic file (PDF, etc.)20 MBFiles

How to find unused files (the hard part)

Most people don’t realise that Shopify doesn’t keep track of which actual files are in use on your store. A file could be uploaded and left sitting idle in the files area in Settings, never attached to a product. Yet there might be a tab control or slider or carousel in a theme section, or in a blog post, or in a metafield for example, that is using that idle file. Deleting files blind in the store admin is fun because you have absolutely no idea where that missing file is actually being used and it could be almost anywhere on the site – with the worst case scenario being something that breaks on your home page.

Three rough ways to audit:

  1. Export first. Use a product export tool to pull every product image URL. Compare that list against your Files page. Anything in Files that isn’t on a product, at minimum, is a candidate.
  2. Search your theme. Download your live theme, grep the Liquid for cdn.shopify.com/s/files, and you’ll see every hardcoded URL. Cross reference.
  3. Check blog posts and metafields. Blog post bodies can reference old CDN paths. So can metafield-driven sections. These are easy to miss.

— Want a shortcut? — CS Export Product Images will dump every product image with its metadata so you can see what’s attached where. Theme and blog audits still need a grep pass.

Native bulk delete: the slow way

You can bulk delete files on Shopify’s Files page (Settings > Files), but it is really inefficient. You click the check box, select the files on that page (you can select up to 50 files per page), and click Delete. Then you are prompted to confirm the deletion of files. You then wait a few seconds or a few minutes for it to delete all of them, only to repeat the whole process again for the rest of your files that didn’t get deleted in the initial bulk deletion.

Even though it’s relatively painless to delete individual junk files, when you have 200 bad files it becomes a weekend long job. It would be a lot easier to have a much more functional Files page filter. You can currently filter and sort by type (image, video, generic) but you can’t filter for “not attached to any product” which is exactly what I want to be able to do.

Why they capped it at 50 at first I have no idea but for a real store this limit is nuts.

Bulk delete via the Shopify API

The GraphQL Admin API is easier to use for this kind of thing, with a fileDelete mutation that takes an array of file GIDs and deletes them in one hit. You can do up to 250 at a time, which should save you a ton of clicking compared to the current interface.

Rough workflow: query files with a filter (e.g. files older than 6 months that are of type GenericFile), collect the IDs off the output, then pipe them into fileDelete (batched up to 100 at a time to stay within throttle limits). Should a user error occur in the delete process, that file won’t get deleted (presumably). Assuming completely naive, this would take about half a day to learn, I’d highly recommend practicing this workflow on a dev store first, as there is no undo.

Not a developer? Skip to the next section.

Apps that actually do bulk file delete

There are a handful of file manager apps available on the Shopify App Store, filtered under “files” and/or “storage”. The majority of the apps in this section have a specific focus to either find out your unused assets, to delete bulk files with filters or to rearrange files and put them in organisation-friendly folders.

For cleaning up a product-based mess, we have an awesome new app called CS Bulk Delete Products. This app will allow you to delete products based on all sorts of filters (collection, vendor, tag, inventory, date, etc) and of course, this will then free up all of the images associated with those deleted products. And let’s be real, there’s probably a step 1 involved for deleting loads of products in the first place – our guide for detecting and deleting duplicate products may serve as a great starting point.

Share images across variant options to reduce duplication

Another one: Removing large blocks of product from your store. Sure, there are many apps that can help you do a better job of removing product with a bulk delete, but I was amazed that not one commenter today mentioned that the best bulk delete is the bulk delete you never needed. If you have 800 versions of one shirt in 12 colors, and every single one of those variants is getting the same product image uploaded, then you’ve uploaded 9600 redundant images to catalog. It’s so much easier to never upload those redundant images in the first place. There are several apps on the site which can help you share images between option values.

A real merchant review on the theme of cleanup:

“We’ve tried several solutions for managing variant images, but Rubik Variant Images stands out. It’s like giving our product pages a much-needed declutter. Customers now see only the images that match their selection, which has noticeably reduced the ‘Is this the right color?’ support queries.”

Shopify App Store review, Rubik Variant Images

Want to see an example of this in action? The Rubik Variant Images documentation shows product page filtering examples, while The Rubik Combined Listings documentation shows how grouped listings are created. Both apps have free plans so you can test before you buy.

Clean up the catalog first, the files second

FAQ

Can I bulk delete files from Shopify admin?

a class=”new” href=”/help/admin-api/file-delete” title=”Learn how to delete up to 50 files at a time on the Files page, then automate larger file cleanups with the GraphQL Admin API or third-party file manager apps”>You can delete files on the Files page, but up to 50 at a time.

Does Shopify have a storage limit?

Even though Shopify claims unlimited file storage on every plan, files are still capped at 20MB for images, 1GB for videos, and 500MB for 3D models.

Will deleting files break my store?

You delete a file URL referenced in a theme section, blog post, or metafield and it 404s. Audit and backup first.

How do I find unused files in Shopify?

There is no native “show unused” filter. Export product image URLs, grep your theme for CDN paths, and compare against your Files page.

Can I recover deleted Shopify files?

No. Deletion is permanent. Export backups before any bulk operation.

Our Shopify Apps

Smart Bulk Image Upload

Bulk upload product images from Google Drive & save time!

Rubik Variant Image & Swatch

Show only relevant variant images on your product pages.

Rubik Combined Listings Swatch app

Rubik Combined Listings

Link separate products as variants with beautiful swatches

CS – Export Product Images

Bulk export product images by vendor, collection or status

Blog Posts