How to undo a CSV import in Shopify
Shopify has no undo button for product CSV imports. Once an import starts it can't be cancelled, and Shopify keeps no history of past imports. To roll back, you re-import an export you took before the import. Without that file, you fix products by hand or restore them from a history app that was installed before the import ran.
Why a bad import is hard to reverse
Two rules in Shopify's CSV import cause most of the damage:
- "Overwrite products with matching handles" replaces the values in every column the file contains, for every product whose handle matches.
- A blank cell overwrites. If a column is in the file but a cell is empty, Shopify writes a blank value. If the column is left out of the file, the existing value stays.
So a file with an empty Compare-at price column clears compare-at prices on every product in the file. A spreadsheet sorted before saving can also detach images from their products, which Shopify's help page warns about.
How to undo a CSV import without an app
If you exported before the import
- Open the export you took before the import. Don't edit or sort it.
- In Products → Import, choose the file.
- Tick Overwrite products with matching handles.
- Run the import and wait for the confirmation email.
- Spot-check five or ten products: prices, compare-at prices, variants, images, tags.
Limits of this method:
- It overwrites everything in the file, including edits staff made after the bad import. Remove those rows or columns first, or redo the edits afterwards.
- Products the import created stay. Re-importing doesn't delete them. Sort the product list by Created (newest first) and delete or archive them.
- Variants the import deleted or recreated come back with new variant IDs, which can break apps that rely on them. (Deleted products are a separate problem: see how to restore a deleted product.)
- Collections aren't in the export. Shopify's export leaves out the
Collectioncolumn, so manual collection membership and sort order are not restored. - Variant metafields aren't supported in product CSVs.
- Stock is only covered for single-location stores. Multi-location stores need the separate inventory CSV.
If you didn't export first
- Check whether you still have the source file the import was built from. If it held correct data for some columns, delete the broken columns and re-import only the good ones (left-out columns aren't touched). Keep
URL handleandTitle, andOption1 nameandOption1 valueif the file has variant columns, or Shopify can delete or recreate variants. - Check other systems that hold product data: a supplier feed, an ERP, a Google Merchant Center feed, or a bulk editor app. A bulk editor app's undo covers edits made through that app, not a Shopify CSV import.
- Fix the remaining products by hand.
- Contact Shopify Support, but there's no self-serve restore to ask for.
What Shopify can and can't undo after an import
| After a CSV import | Shopify on its own | Notes |
|---|---|---|
| Cancel the import while it runs | No | Imports can't be cancelled once started |
| See what the import changed | No | No import history; the activity log is a record, not an undo |
| Restore overwritten fields | Only by re-importing a prior export | Also overwrites later good edits |
| Remove products the import created | Manually | Sort by Created, then delete or archive |
| Bring back deleted products | No | Deletion is permanent per Shopify's API docs |
| Restore manual collection membership | No | Export has no Collection column |
| Restore stock levels | Single-location stores via CSV; others via inventory CSV | Only if you exported stock first |
Full list across all change types: what Shopify can and can't undo.
How it works with Trailmark
Trailmark saves a version of each product every time it changes, including changes made by a CSV import, a bulk editor or another app. It has to be installed before the import: it can't see history from before it was installed.
If the import touched many products at once, Trailmark shows an alert on its Alerts page and a banner on its home page. A burst counts when it touches about 10% of the catalog (at least 10 products, at most 50) within a run of edits with no 5-minute gap (a run is capped at 30 minutes). Alerts are in the app; there's no email or Slack delivery yet.
From the alert, Undo this change takes back only what the import changed:
- For each product, it compares the version before the import, the version right after it, and the product now.
- Each part the import touched goes back to its earlier value: title, handle, description, vendor, type, status, each variant's price, compare-at price, SKU, barcode and options, tags, images, metafields and manual collections.
- If someone edited a field again after the import, it's kept as it is now and listed as a conflict. Tick a conflict to put it back anyway. Tags and collections are merged item by item instead: later additions stay, with no conflict.
- A preview lists the changes for up to 50 products before anything runs.
- Online Store visibility isn't undone. Restore it from the product's timeline.
For smaller imports, or to pick products yourself, use bulk revert (paid plans): select products, pick a date, and revert each to its state at the end of that day. The preview shows which products will change, which come back as new, and which already match. Unlike the alert undo, this also replaces later edits to those products. Your latest bulk revert can itself be undone.
What it doesn't do: stock is shown in history but never reverted, because orders keep selling while you fix the catalog. Products the import created are not deleted for you.
Checklist before your next CSV import
- Export all products (Products → Export → All products) and keep the file untouched.
- If you're multi-location, export the inventory CSV too.
- Note which manual collections the affected products are in, and their sort order.
- Include only the columns you mean to change, plus
URL handle,Titleand (for variant columns)Option1 nameandOption1 value. Delete the rest; left-out columns are kept. - Search the file for empty cells in the columns you kept.
- Don't sort rows in the spreadsheet; it can break image links.
- Import a 5-row test file first.
- Run the import when no one else is editing products.
FAQ
Can I cancel a Shopify CSV import while it's running?
No. Shopify says product imports can't be cancelled once they begin. Wait for it to finish, then roll back.
Does re-importing my old export fully undo the import?
Not fully. It restores the fields in the file, but it also overwrites any good edits made since, doesn't delete products the import created, and doesn't restore collection membership.
Why did my import clear prices or descriptions?
The column was in the file with empty cells. Shopify writes blank values for empty cells in included columns. Leave a column out entirely to keep existing values.
Does Shopify keep a backup I can restore from?
No. Shopify asks you to make your own backup before importing, and there's no self-serve restore.
Can an app undo an import that happened before I installed it?
No. A history app only knows changes it saw. Install one before the import you might need to undo.
Will undoing the import change my stock levels?
With Trailmark, no. Stock history is shown, but reverts never change stock. With a CSV re-import, only if your file includes the Inventory quantity column.