Orphaned app-owned metaobject definitions cannot be deleted even after reinstalling app

When an app that creates metaobject definitions via the GraphQL Admin API (metaobjectDefinitionCreate) is uninstalled, the definitions remain on the store but become completely inaccessible.

I’m aware this has been reported before (here and here), but the commonly suggested workaround of “reinstall the app and delete via API” does not actually work.

Why reinstalling doesn’t help:

When an app is reinstalled, Shopify assigns it a new installation ID. The original definitions were created under the old ID (e.g. app–328751644673–sc_campaign), but the reinstalled app now operates under a different ID (e.g. app–328751513601–sc_campaign). As a result:

  • metaobjectDefinitions query does not return the old definitions
  • metaobjectDefinitionByType returns null for the old type
  • The reinstalled app has no way to reference or delete the orphaned definitions

This is true even when using the Shopify GraphiQL app - the definitions are completely invisible to all API tokens.

The real-world impact:

The orphaned definition has an onlineStore capability with URL handle “awards”. Our production app (a separate Shopify app) now cannot create its own campaign definition with the same handle, failing with URL_HANDLE_TAKEN. There is no way to release that handle.

The definitions are visible in the admin under Settings → Custom data, but the merchant cannot delete them because they are app-owned.

Expected behaviour:

At minimum one of the following:

  1. Reinstalling the same app should allow managing definitions created by the previous installation
  2. Store owners should be able to delete orphaned app-owned definitions from the admin after the app is uninstalled
  3. GraphQL-created definitions should be cleaned up on uninstall, same as TOML-managed definitions

Can Shopify assist with manually removing these from our store?

Hi @Luke,

As @Donal-Shopify mentioned in the second thread you shared, this is a known behaviour to our developers and I can confirm that they are continuing to look into this issue further internally.

I can also confirm that we do now have a process in place to clear out any orphaned metaobjects on our end, to help any merchants or partners experiencing this error while we work on a fix for this further.

Please do reach out to our Support Team via the Shopify Help Center, while logged into a Staff Account on the store in question, or Partner Account that owns the app that created the metaobjects, and we can coordinate with our developers internally to help clear out the orphaned metaobjects for you.