Custom data guide

How to remove unused metafield definitions (and app leftovers) safely

What you’ll need

  • Access to both stores in your Shopify admin

    How to get this: Access to both stores in your Shopify admin
    1. Sign in at admin.shopify.com with the account you use for your store.
    2. If you are staff rather than the owner, ask the owner to give you both stores permission in Settings › Users.

    Step-by-step guide (opens in a new tab)

  • Shopify’s free GraphiQL app (with installed on both stores, with read_metaobject_definitions and the write access for each type you copy access)

    How to get this: Shopify’s free GraphiQL app
    1. Install it once from shopify-graphiql-app.shopifycloud.com: enter your store address, tick the access listed here, click Install and approve.
    2. Then open it any time from Apps › Shopify GraphiQL App in your admin.

    Step-by-step guide (opens in a new tab)

Find unused definitions

What can’t be removed here

  • App-owned definitions (namespace app--…): only the app that made them can remove them.
  • Shopify’s standard and category definitions: turn those off in Settings › Metafields and metaobjects.
  • The values of a reference field: Shopify answers “Deleting a reference type metafield definition requires deletion of its associated metafields” if you try to keep them.

Undo

The copier gives you the create mutations for exactly what you removed, from the backup. That brings the definitions back. Values deleted with “also delete values” can’t be brought back.

More guides

Based on metafieldDefinitionCreate, metaobjectDefinitionCreate, validation options and metafieldDefinitionDelete.